Regen all remaining APIs with preproc - more changes than anticipated

This commit is contained in:
Sebastian Thiel
2019-07-05 17:05:15 +08:00
parent f33fae47e9
commit 3365d9fba1
90 changed files with 2777 additions and 2569 deletions

View File

@@ -409,23 +409,23 @@ impl ResponseResult for ListInstancesResponse {}
/// their respective values.
///
/// Supported field names:
/// - "authority", which is "[token]" if IAMContext.token is present,
/// otherwise the value of IAMContext.authority_selector if present, and
/// otherwise a representation of IAMContext.principal; or
/// - "iam_principal", a representation of IAMContext.principal even if a
/// token or authority selector is present; or
/// - "" (empty string), resulting in a counter with no fields.
///
/// * "authority", which is "[token]" if IAMContext.token is present,
/// otherwise the value of IAMContext.authority_selector if present, and
/// otherwise a representation of IAMContext.principal; or
/// * "iam_principal", a representation of IAMContext.principal even if a
/// token or authority selector is present; or
/// * "" (empty string), resulting in a counter with no fields.
///
/// Examples:
/// counter { metric: "/debug_access_count" field: "iam_principal" }
/// ==> increment counter /iam/policy/backend_debug_access_count
/// {iam_principal=[value of IAMContext.principal]}
/// counter { metric: "/debug_access_count" field: "iam_principal" }
/// ==> increment counter /iam/policy/backend_debug_access_count
/// {iam_principal=[value of IAMContext.principal]}
///
/// At this time we do not support multiple field names (though this may be
/// supported in the future).
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct CounterOptions {
/// The field value to attribute.
@@ -482,12 +482,13 @@ impl RequestValue for SetIamPolicyRequest {}
/// Represents an expression text. Example:
///
/// title: "User account presence"
/// description: "Determines whether the request has a user account"
/// expression: "size(request.user) > 0"
/// ````text
/// title: "User account presence"
/// description: "Determines whether the request has a user account"
/// expression: "size(request.user) > 0"
/// ````
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Expr {
/// An optional description of the expression. This is a longer text which
@@ -514,25 +515,26 @@ impl Part for Expr {}
/// Provides the configuration for logging a type of permissions.
/// Example:
///
/// ````text
/// {
/// "audit_log_configs": [
/// {
/// "audit_log_configs": [
/// {
/// "log_type": "DATA_READ",
/// "exempted_members": [
/// "user:foo@gmail.com"
/// ]
/// },
/// {
/// "log_type": "DATA_WRITE",
/// }
/// "log_type": "DATA_READ",
/// "exempted_members": [
/// "user:foo@gmail.com"
/// ]
/// },
/// {
/// "log_type": "DATA_WRITE",
/// }
/// ]
/// }
/// ````
///
/// This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
/// foo@gmail.com from DATA_READ logging.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct AuditLogConfig {
/// Specifies the identities that do not cause logging for this type of
@@ -743,7 +745,8 @@ pub struct Location {
pub display_name: Option<String>,
/// Cross-service attributes for the location. For example
///
/// {"cloud.googleapis.com/region": "us-east1"}
/// ````text
/// {"cloud.googleapis.com/region": "us-east1"}````
pub labels: Option<HashMap<String, String>>,
/// The canonical id for this location. For example: `"us-east1"`.
#[serde(rename="locationId")]
@@ -762,7 +765,6 @@ impl ResponseResult for Location {}
/// Defines an Identity and Access Management (IAM) policy. It is used to
/// specify access control policies for Cloud Platform resources.
///
///
/// A `Policy` consists of a list of `bindings`. A `binding` binds a list of
/// `members` to a `role`, where the members can be user accounts, Google groups,
/// Google domains, and service accounts. A `role` is a named list of permissions
@@ -770,37 +772,40 @@ impl ResponseResult for Location {}
///
/// **JSON Example**
///
/// ````text
/// {
/// "bindings": [
/// {
/// "bindings": [
/// {
/// "role": "roles/owner",
/// "members": [
/// "user:mike@example.com",
/// "group:admins@example.com",
/// "domain:google.com",
/// "serviceAccount:my-other-app@appspot.gserviceaccount.com"
/// ]
/// },
/// {
/// "role": "roles/viewer",
/// "members": ["user:sean@example.com"]
/// }
/// "role": "roles/owner",
/// "members": [
/// "user:mike@example.com",
/// "group:admins@example.com",
/// "domain:google.com",
/// "serviceAccount:my-other-app@appspot.gserviceaccount.com"
/// ]
/// },
/// {
/// "role": "roles/viewer",
/// "members": ["user:sean@example.com"]
/// }
/// ]
/// }
/// ````
///
/// **YAML Example**
///
/// bindings:
/// - members:
/// - user:mike@example.com
/// - group:admins@example.com
/// - domain:google.com
/// - serviceAccount:my-other-app@appspot.gserviceaccount.com
/// role: roles/owner
/// - members:
/// - user:sean@example.com
/// role: roles/viewer
///
/// ````text
/// bindings:
/// - members:
/// - user:mike@example.com
/// - group:admins@example.com
/// - domain:google.com
/// - serviceAccount:my-other-app@appspot.gserviceaccount.com
/// role: roles/owner
/// - members:
/// - user:sean@example.com
/// role: roles/viewer
/// ````
///
/// For a description of IAM and its features, see the
/// [IAM developer's guide](https://cloud.google.com/iam/docs).
@@ -812,7 +817,6 @@ impl ResponseResult for Location {}
///
/// * [locations instances set iam policy projects](struct.ProjectLocationInstanceSetIamPolicyCall.html) (response)
/// * [locations instances get iam policy projects](struct.ProjectLocationInstanceGetIamPolicyCall.html) (response)
///
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Policy {
/// Specifies cloud audit logging configuration for this policy.
@@ -856,9 +860,11 @@ impl ResponseResult for Policy {}
/// 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);
/// }
/// ````text
/// service Foo {
/// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
/// }
/// ````
///
/// The JSON representation for `Empty` is empty JSON object `{}`.
///
@@ -869,7 +875,6 @@ impl ResponseResult for Policy {}
///
/// * [locations operations delete projects](struct.ProjectLocationOperationDeleteCall.html) (response)
/// * [locations operations cancel projects](struct.ProjectLocationOperationCancelCall.html) (response)
///
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Empty { _never_set: Option<bool> }
@@ -1043,48 +1048,49 @@ impl RequestValue for UpgradeInstanceRequest {}
///
/// Example Policy with multiple AuditConfigs:
///
/// ````text
/// {
/// "audit_configs": [
/// {
/// "audit_configs": [
/// "service": "allServices"
/// "audit_log_configs": [
/// {
/// "service": "allServices"
/// "audit_log_configs": [
/// {
/// "log_type": "DATA_READ",
/// "exempted_members": [
/// "user:foo@gmail.com"
/// ]
/// },
/// {
/// "log_type": "DATA_WRITE",
/// },
/// {
/// "log_type": "ADMIN_READ",
/// }
/// "log_type": "DATA_READ",
/// "exempted_members": [
/// "user:foo@gmail.com"
/// ]
/// },
/// {
/// "service": "fooservice.googleapis.com"
/// "audit_log_configs": [
/// {
/// "log_type": "DATA_READ",
/// },
/// {
/// "log_type": "DATA_WRITE",
/// "exempted_members": [
/// "user:bar@gmail.com"
/// ]
/// }
/// "log_type": "DATA_WRITE",
/// },
/// {
/// "log_type": "ADMIN_READ",
/// }
/// ]
/// },
/// {
/// "service": "fooservice.googleapis.com"
/// "audit_log_configs": [
/// {
/// "log_type": "DATA_READ",
/// },
/// {
/// "log_type": "DATA_WRITE",
/// "exempted_members": [
/// "user:bar@gmail.com"
/// ]
/// }
/// ]
/// }
/// ]
/// }
/// ````
///
/// For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
/// logging. It also exempts foo@gmail.com from DATA_READ logging, and
/// bar@gmail.com from DATA_WRITE logging.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct AuditConfig {
/// no description provided