diff --git a/packages/google-cloud-iap/protos/google/cloud/iap/v1/service.proto b/packages/google-cloud-iap/protos/google/cloud/iap/v1/service.proto index cb28b24c6e3..919009292c4 100644 --- a/packages/google-cloud-iap/protos/google/cloud/iap/v1/service.proto +++ b/packages/google-cloud-iap/protos/google/cloud/iap/v1/service.proto @@ -38,16 +38,20 @@ option (google.api.resource_definition) = { pattern: "projects/{project}/iap_tunnel/locations/{location}" }; +// The Cloud Identity-Aware Proxy API. + // APIs for Identity-Aware Proxy Admin configurations. service IdentityAwareProxyAdminService { option (google.api.default_host) = "iap.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Sets the access control policy for an Identity-Aware Proxy protected // resource. Replaces any existing policy. // More information about managing access via IAP can be found at: // https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=**}:setIamPolicy" body: "*" @@ -58,7 +62,8 @@ service IdentityAwareProxyAdminService { // resource. // More information about managing access via IAP can be found at: // https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=**}:getIamPolicy" body: "*" @@ -69,7 +74,8 @@ service IdentityAwareProxyAdminService { // resource. // More information about managing access via IAP can be found at: // https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v1/{resource=**}:testIamPermissions" body: "*" @@ -95,7 +101,8 @@ service IdentityAwareProxyAdminService { // Lists the existing TunnelDestGroups. To group across all locations, use a // `-` as the location ID. For example: // `/v1/projects/123/iap_tunnel/locations/-/destGroups` - rpc ListTunnelDestGroups(ListTunnelDestGroupsRequest) returns (ListTunnelDestGroupsResponse) { + rpc ListTunnelDestGroups(ListTunnelDestGroupsRequest) + returns (ListTunnelDestGroupsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/iap_tunnel/locations/*}/destGroups" }; @@ -103,12 +110,14 @@ service IdentityAwareProxyAdminService { } // Creates a new TunnelDestGroup. - rpc CreateTunnelDestGroup(CreateTunnelDestGroupRequest) returns (TunnelDestGroup) { + rpc CreateTunnelDestGroup(CreateTunnelDestGroupRequest) + returns (TunnelDestGroup) { option (google.api.http) = { post: "/v1/{parent=projects/*/iap_tunnel/locations/*}/destGroups" body: "tunnel_dest_group" }; - option (google.api.method_signature) = "parent,tunnel_dest_group,tunnel_dest_group_id"; + option (google.api.method_signature) = + "parent,tunnel_dest_group,tunnel_dest_group_id"; } // Retrieves an existing TunnelDestGroup. @@ -120,7 +129,8 @@ service IdentityAwareProxyAdminService { } // Deletes a TunnelDestGroup. - rpc DeleteTunnelDestGroup(DeleteTunnelDestGroupRequest) returns (google.protobuf.Empty) { + rpc DeleteTunnelDestGroup(DeleteTunnelDestGroupRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/iap_tunnel/locations/*/destGroups/*}" }; @@ -128,7 +138,8 @@ service IdentityAwareProxyAdminService { } // Updates a TunnelDestGroup. - rpc UpdateTunnelDestGroup(UpdateTunnelDestGroupRequest) returns (TunnelDestGroup) { + rpc UpdateTunnelDestGroup(UpdateTunnelDestGroupRequest) + returns (TunnelDestGroup) { option (google.api.http) = { patch: "/v1/{tunnel_dest_group.name=projects/*/iap_tunnel/locations/*/destGroups/*}" body: "tunnel_dest_group" @@ -188,13 +199,14 @@ message CreateTunnelDestGroupRequest { ]; // Required. The TunnelDestGroup to create. - TunnelDestGroup tunnel_dest_group = 2 [(google.api.field_behavior) = REQUIRED]; + TunnelDestGroup tunnel_dest_group = 2 + [(google.api.field_behavior) = REQUIRED]; - // Required. The ID to use for the TunnelDestGroup, which becomes the final component of - // the resource name. + // Required. The ID to use for the TunnelDestGroup, which becomes the final + // component of the resource name. // // This value must be 4-63 characters, and valid characters - // are `[a-z][0-9]-`. + // are `[a-z]-`. string tunnel_dest_group_id = 3 [(google.api.field_behavior) = REQUIRED]; } @@ -227,7 +239,8 @@ message DeleteTunnelDestGroupRequest { // The request to UpdateTunnelDestGroup. message UpdateTunnelDestGroupRequest { // Required. The new values for the TunnelDestGroup. - TunnelDestGroup tunnel_dest_group = 1 [(google.api.field_behavior) = REQUIRED]; + TunnelDestGroup tunnel_dest_group = 1 + [(google.api.field_behavior) = REQUIRED]; // A field mask that specifies which IAP settings to update. // If omitted, then all of the settings are updated. See @@ -242,100 +255,21 @@ message TunnelDestGroup { pattern: "projects/{project}/iap_tunnel/locations/{location}/destGroups/{dest_group}" }; - // Required. Immutable. Identifier for the TunnelDestGroup. Must be unique within the - // project. + // Required. Immutable. Identifier for the TunnelDestGroup. Must be unique + // within the project and contain only lower case letters (a-z) and dashes + // (-). string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; - // null List of CIDRs that this group applies to. + // Unordered list. List of CIDRs that this group applies to. repeated string cidrs = 2 [(google.api.field_behavior) = UNORDERED_LIST]; - // null List of FQDNs that this group applies to. + // Unordered list. List of FQDNs that this group applies to. repeated string fqdns = 3 [(google.api.field_behavior) = UNORDERED_LIST]; } -// API to programmatically create, list and retrieve Identity Aware Proxy (IAP) -// OAuth brands; and create, retrieve, delete and reset-secret of IAP OAuth -// clients. -service IdentityAwareProxyOAuthService { - option (google.api.default_host) = "iap.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Lists the existing brands for the project. - rpc ListBrands(ListBrandsRequest) returns (ListBrandsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*}/brands" - }; - } - - // Constructs a new OAuth brand for the project if one does not exist. - // The created brand is "internal only", meaning that OAuth clients created - // under it only accept requests from users who belong to the same Google - // Workspace organization as the project. The brand is created in an - // un-reviewed status. NOTE: The "internal only" status can be manually - // changed in the Google Cloud Console. Requires that a brand does not already - // exist for the project, and that the specified support email is owned by the - // caller. - rpc CreateBrand(CreateBrandRequest) returns (Brand) { - option (google.api.http) = { - post: "/v1/{parent=projects/*}/brands" - body: "brand" - }; - } - - // Retrieves the OAuth brand of the project. - rpc GetBrand(GetBrandRequest) returns (Brand) { - option (google.api.http) = { - get: "/v1/{name=projects/*/brands/*}" - }; - } - - // Creates an Identity Aware Proxy (IAP) OAuth client. The client is owned - // by IAP. Requires that the brand for the project exists and that it is - // set for internal-only use. - rpc CreateIdentityAwareProxyClient(CreateIdentityAwareProxyClientRequest) returns (IdentityAwareProxyClient) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients" - body: "identity_aware_proxy_client" - }; - } - - // Lists the existing clients for the brand. - rpc ListIdentityAwareProxyClients(ListIdentityAwareProxyClientsRequest) returns (ListIdentityAwareProxyClientsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients" - }; - } - - // Retrieves an Identity Aware Proxy (IAP) OAuth client. - // Requires that the client is owned by IAP. - rpc GetIdentityAwareProxyClient(GetIdentityAwareProxyClientRequest) returns (IdentityAwareProxyClient) { - option (google.api.http) = { - get: "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" - }; - } - - // Resets an Identity Aware Proxy (IAP) OAuth client secret. Useful if the - // secret was compromised. Requires that the client is owned by IAP. - rpc ResetIdentityAwareProxyClientSecret(ResetIdentityAwareProxyClientSecretRequest) returns (IdentityAwareProxyClient) { - option (google.api.http) = { - post: "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}:resetSecret" - body: "*" - }; - } - - // Deletes an Identity Aware Proxy (IAP) OAuth client. Useful for removing - // obsolete clients, managing the number of clients in a given project, and - // cleaning up after tests. Requires that the client is owned by IAP. - rpc DeleteIdentityAwareProxyClient(DeleteIdentityAwareProxyClientRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" - }; - } -} - // The request sent to GetIapSettings. message GetIapSettingsRequest { // Required. The resource name for which to retrieve the settings. @@ -382,6 +316,9 @@ message AccessSettings { // Settings to configure reauthentication policies in IAP. ReauthSettings reauth_settings = 6; + + // Settings to configure and enable allowed domains. + AllowedDomainsSettings allowed_domains_settings = 7; } // Allows customers to configure tenant_id for GCIP instance per-app. @@ -426,15 +363,11 @@ message ReauthSettings { // Reauthentication disabled. METHOD_UNSPECIFIED = 0; - // Mimics the behavior as if the user had logged out and tried to log in - // again. Users with 2SV (2-step verification) enabled see their 2SV - // challenges if they did not opt to have their second factor responses - // saved. Apps Core (GSuites) admins can configure settings to disable 2SV - // cookies and require 2SV for all Apps Core users in their domains. + // Prompts the user to log in again. LOGIN = 1; - // User must type their password. - PASSWORD = 2; + // Deprecated, no longer accepted by IAP APIs. + PASSWORD = 2 [deprecated = true]; // User must use their secure key 2nd factor device. SECURE_KEY = 3; @@ -453,7 +386,7 @@ message ReauthSettings { DEFAULT = 2; } - // Reauth method required by the policy. + // Reauth method requested. Method method = 1; // Reauth session lifetime, how long before a user has to reauthenticate @@ -465,9 +398,19 @@ message ReauthSettings { PolicyType policy_type = 3; } +// Configuration for IAP allowed domains. Lets you to restrict access to an app +// and allow access to only the domains that you list. +message AllowedDomainsSettings { + // Configuration for customers to opt in for the feature. + optional bool enable = 1; + + // List of trusted domains. + repeated string domains = 2; +} + // Wrapper over application specific settings for IAP. message ApplicationSettings { - // Settings to configure IAP's behavior for a CSM mesh. + // Settings to configure IAP's behavior for a service mesh. CsmSettings csm_settings = 1; // Customization for Access Denied page. @@ -476,12 +419,15 @@ message ApplicationSettings { // The Domain value to set for cookies generated by IAP. This value is not // validated by the API, but will be ignored at runtime if invalid. google.protobuf.StringValue cookie_domain = 3; + + // Settings to configure attribute propagation. + AttributePropagationSettings attribute_propagation_settings = 4; } -// Configuration for RCTokens generated for CSM workloads protected by IAP. -// RCTokens are IAP generated JWTs that can be verified at the application. The -// RCToken is primarily used for ISTIO deployments, and can be scoped to a -// single mesh by configuring the audience field accordingly +// Configuration for RCToken generated for service mesh workloads protected by +// IAP. RCToken are IAP generated JWTs that can be verified at the application. +// The RCToken is primarily used for service mesh deployments, and can be scoped +// to a single mesh by configuring the audience field accordingly. message CsmSettings { // Audience claim set in the generated RCToken. This value is not validated by // IAP. @@ -499,6 +445,154 @@ message AccessDeniedPageSettings { // Whether to generate a troubleshooting URL on access denied events to this // application. google.protobuf.BoolValue generate_troubleshooting_uri = 2; + + // Whether to generate remediation token on access denied events to this + // application. + optional google.protobuf.BoolValue remediation_token_generation_enabled = 3; +} + +// Configuration for propagating attributes to applications protected +// by IAP. +message AttributePropagationSettings { + // Supported output credentials for attribute propagation. Each output + // credential maps to a "field" in the response. For example, selecting JWT + // will propagate all attributes in the IAP JWT, header in the headers, etc. + enum OutputCredentials { + // No output credential. This is an unsupported default. + OUTPUT_CREDENTIALS_UNSPECIFIED = 0; + + // Propagate attributes in the headers with "x-goog-iap-attr-" prefix. + HEADER = 1; + + // Propagate attributes in the JWT of the form: `"additional_claims": { + // "my_attribute": ["value1", "value2"] }` + JWT = 2; + + // Propagate attributes in the RCToken of the form: `"additional_claims": { + // "my_attribute": ["value1", "value2"] }` + RCTOKEN = 3; + } + + // Raw string CEL expression. Must return a list of attributes. Maximum of 45 + // attributes can be selected. Expressions can select different attribute + // types from `attributes`: `attributes.saml_attributes`, + // `attributes.iap_attributes`. Limited functions are supported: + // - `filter: .filter(, )` -> returns a subset of + // `` where `` is true for every item. + // - `in: in ` -> returns true if `` contains `` + // - `selectByName: .selectByName()` -> returns the attribute + // in + // `` with the given `` name, otherwise returns empty. + // - `emitAs: .emitAs()` -> sets the `` name + // field to the given `` for propagation in selected output + // credentials. + // - `strict: .strict()` -> ignore the `x-goog-iap-attr-` prefix + // for the provided `` when propagating via the `HEADER` output + // credential, i.e. request headers. + // - `append: .append()` OR + // `.append()` -> append the provided `` or + // `` onto the end of ``. + // + // Example expression: `attributes.saml_attributes.filter(x, x.name in + // ['test']).append(attributes.iap_attributes.selectByName('exact').emitAs('custom').strict())` + optional string expression = 1; + + // Which output credentials attributes selected by the CEL expression should + // be propagated in. All attributes will be fully duplicated in each selected + // output credential. + repeated OutputCredentials output_credentials = 2; + + // Whether the provided attribute propagation settings should be evaluated on + // user requests. If set to true, attributes returned from the expression will + // be propagated in the set output credentials. + optional bool enable = 3; +} + +// API to programmatically create, list and retrieve Identity Aware Proxy (IAP) +// OAuth brands; and create, retrieve, delete and reset-secret of IAP OAuth +// clients. +service IdentityAwareProxyOAuthService { + option (google.api.default_host) = "iap.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists the existing brands for the project. + rpc ListBrands(ListBrandsRequest) returns (ListBrandsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/brands" + }; + } + + // Constructs a new OAuth brand for the project if one does not exist. + // The created brand is "internal only", meaning that OAuth clients created + // under it only accept requests from users who belong to the same Google + // Workspace organization as the project. The brand is created in an + // un-reviewed status. NOTE: The "internal only" status can be manually + // changed in the Google Cloud Console. Requires that a brand does not already + // exist for the project, and that the specified support email is owned by the + // caller. + rpc CreateBrand(CreateBrandRequest) returns (Brand) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/brands" + body: "brand" + }; + } + + // Retrieves the OAuth brand of the project. + rpc GetBrand(GetBrandRequest) returns (Brand) { + option (google.api.http) = { + get: "/v1/{name=projects/*/brands/*}" + }; + } + + // Creates an Identity Aware Proxy (IAP) OAuth client. The client is owned + // by IAP. Requires that the brand for the project exists and that it is + // set for internal-only use. + rpc CreateIdentityAwareProxyClient(CreateIdentityAwareProxyClientRequest) + returns (IdentityAwareProxyClient) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients" + body: "identity_aware_proxy_client" + }; + } + + // Lists the existing clients for the brand. + rpc ListIdentityAwareProxyClients(ListIdentityAwareProxyClientsRequest) + returns (ListIdentityAwareProxyClientsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients" + }; + } + + // Retrieves an Identity Aware Proxy (IAP) OAuth client. + // Requires that the client is owned by IAP. + rpc GetIdentityAwareProxyClient(GetIdentityAwareProxyClientRequest) + returns (IdentityAwareProxyClient) { + option (google.api.http) = { + get: "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" + }; + } + + // Resets an Identity Aware Proxy (IAP) OAuth client secret. Useful if the + // secret was compromised. Requires that the client is owned by IAP. + rpc ResetIdentityAwareProxyClientSecret( + ResetIdentityAwareProxyClientSecretRequest) + returns (IdentityAwareProxyClient) { + option (google.api.http) = { + post: "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}:resetSecret" + body: "*" + }; + } + + // Deletes an Identity Aware Proxy (IAP) OAuth client. Useful for removing + // obsolete clients, managing the number of clients in a given project, and + // cleaning up after tests. Requires that the client is owned by IAP. + rpc DeleteIdentityAwareProxyClient(DeleteIdentityAwareProxyClientRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" + }; + } } // The request sent to ListBrands. @@ -571,7 +665,8 @@ message CreateIdentityAwareProxyClientRequest { string parent = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Identity Aware Proxy Client to be created. - IdentityAwareProxyClient identity_aware_proxy_client = 2 [(google.api.field_behavior) = REQUIRED]; + IdentityAwareProxyClient identity_aware_proxy_client = 2 + [(google.api.field_behavior) = REQUIRED]; } // The request sent to GetIdentityAwareProxyClient. diff --git a/packages/google-cloud-iap/protos/protos.d.ts b/packages/google-cloud-iap/protos/protos.d.ts index e48b84cb1a4..211a5c6d2ff 100644 --- a/packages/google-cloud-iap/protos/protos.d.ts +++ b/packages/google-cloud-iap/protos/protos.d.ts @@ -987,198 +987,6 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents an IdentityAwareProxyOAuthService */ - class IdentityAwareProxyOAuthService extends $protobuf.rpc.Service { - - /** - * Constructs a new IdentityAwareProxyOAuthService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new IdentityAwareProxyOAuthService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): IdentityAwareProxyOAuthService; - - /** - * Calls ListBrands. - * @param request ListBrandsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListBrandsResponse - */ - public listBrands(request: google.cloud.iap.v1.IListBrandsRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.ListBrandsCallback): void; - - /** - * Calls ListBrands. - * @param request ListBrandsRequest message or plain object - * @returns Promise - */ - public listBrands(request: google.cloud.iap.v1.IListBrandsRequest): Promise; - - /** - * Calls CreateBrand. - * @param request CreateBrandRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Brand - */ - public createBrand(request: google.cloud.iap.v1.ICreateBrandRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.CreateBrandCallback): void; - - /** - * Calls CreateBrand. - * @param request CreateBrandRequest message or plain object - * @returns Promise - */ - public createBrand(request: google.cloud.iap.v1.ICreateBrandRequest): Promise; - - /** - * Calls GetBrand. - * @param request GetBrandRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Brand - */ - public getBrand(request: google.cloud.iap.v1.IGetBrandRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.GetBrandCallback): void; - - /** - * Calls GetBrand. - * @param request GetBrandRequest message or plain object - * @returns Promise - */ - public getBrand(request: google.cloud.iap.v1.IGetBrandRequest): Promise; - - /** - * Calls CreateIdentityAwareProxyClient. - * @param request CreateIdentityAwareProxyClientRequest message or plain object - * @param callback Node-style callback called with the error, if any, and IdentityAwareProxyClient - */ - public createIdentityAwareProxyClient(request: google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.CreateIdentityAwareProxyClientCallback): void; - - /** - * Calls CreateIdentityAwareProxyClient. - * @param request CreateIdentityAwareProxyClientRequest message or plain object - * @returns Promise - */ - public createIdentityAwareProxyClient(request: google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest): Promise; - - /** - * Calls ListIdentityAwareProxyClients. - * @param request ListIdentityAwareProxyClientsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListIdentityAwareProxyClientsResponse - */ - public listIdentityAwareProxyClients(request: google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.ListIdentityAwareProxyClientsCallback): void; - - /** - * Calls ListIdentityAwareProxyClients. - * @param request ListIdentityAwareProxyClientsRequest message or plain object - * @returns Promise - */ - public listIdentityAwareProxyClients(request: google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest): Promise; - - /** - * Calls GetIdentityAwareProxyClient. - * @param request GetIdentityAwareProxyClientRequest message or plain object - * @param callback Node-style callback called with the error, if any, and IdentityAwareProxyClient - */ - public getIdentityAwareProxyClient(request: google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.GetIdentityAwareProxyClientCallback): void; - - /** - * Calls GetIdentityAwareProxyClient. - * @param request GetIdentityAwareProxyClientRequest message or plain object - * @returns Promise - */ - public getIdentityAwareProxyClient(request: google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest): Promise; - - /** - * Calls ResetIdentityAwareProxyClientSecret. - * @param request ResetIdentityAwareProxyClientSecretRequest message or plain object - * @param callback Node-style callback called with the error, if any, and IdentityAwareProxyClient - */ - public resetIdentityAwareProxyClientSecret(request: google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.ResetIdentityAwareProxyClientSecretCallback): void; - - /** - * Calls ResetIdentityAwareProxyClientSecret. - * @param request ResetIdentityAwareProxyClientSecretRequest message or plain object - * @returns Promise - */ - public resetIdentityAwareProxyClientSecret(request: google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest): Promise; - - /** - * Calls DeleteIdentityAwareProxyClient. - * @param request DeleteIdentityAwareProxyClientRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteIdentityAwareProxyClient(request: google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.DeleteIdentityAwareProxyClientCallback): void; - - /** - * Calls DeleteIdentityAwareProxyClient. - * @param request DeleteIdentityAwareProxyClientRequest message or plain object - * @returns Promise - */ - public deleteIdentityAwareProxyClient(request: google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest): Promise; - } - - namespace IdentityAwareProxyOAuthService { - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|listBrands}. - * @param error Error, if any - * @param [response] ListBrandsResponse - */ - type ListBrandsCallback = (error: (Error|null), response?: google.cloud.iap.v1.ListBrandsResponse) => void; - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|createBrand}. - * @param error Error, if any - * @param [response] Brand - */ - type CreateBrandCallback = (error: (Error|null), response?: google.cloud.iap.v1.Brand) => void; - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|getBrand}. - * @param error Error, if any - * @param [response] Brand - */ - type GetBrandCallback = (error: (Error|null), response?: google.cloud.iap.v1.Brand) => void; - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|createIdentityAwareProxyClient}. - * @param error Error, if any - * @param [response] IdentityAwareProxyClient - */ - type CreateIdentityAwareProxyClientCallback = (error: (Error|null), response?: google.cloud.iap.v1.IdentityAwareProxyClient) => void; - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|listIdentityAwareProxyClients}. - * @param error Error, if any - * @param [response] ListIdentityAwareProxyClientsResponse - */ - type ListIdentityAwareProxyClientsCallback = (error: (Error|null), response?: google.cloud.iap.v1.ListIdentityAwareProxyClientsResponse) => void; - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|getIdentityAwareProxyClient}. - * @param error Error, if any - * @param [response] IdentityAwareProxyClient - */ - type GetIdentityAwareProxyClientCallback = (error: (Error|null), response?: google.cloud.iap.v1.IdentityAwareProxyClient) => void; - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|resetIdentityAwareProxyClientSecret}. - * @param error Error, if any - * @param [response] IdentityAwareProxyClient - */ - type ResetIdentityAwareProxyClientSecretCallback = (error: (Error|null), response?: google.cloud.iap.v1.IdentityAwareProxyClient) => void; - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|deleteIdentityAwareProxyClient}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteIdentityAwareProxyClientCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } - /** Properties of a GetIapSettingsRequest. */ interface IGetIapSettingsRequest { @@ -1502,6 +1310,9 @@ export namespace google { /** AccessSettings reauthSettings */ reauthSettings?: (google.cloud.iap.v1.IReauthSettings|null); + + /** AccessSettings allowedDomainsSettings */ + allowedDomainsSettings?: (google.cloud.iap.v1.IAllowedDomainsSettings|null); } /** Represents an AccessSettings. */ @@ -1525,6 +1336,9 @@ export namespace google { /** AccessSettings reauthSettings. */ public reauthSettings?: (google.cloud.iap.v1.IReauthSettings|null); + /** AccessSettings allowedDomainsSettings. */ + public allowedDomainsSettings?: (google.cloud.iap.v1.IAllowedDomainsSettings|null); + /** * Creates a new AccessSettings instance using the specified properties. * @param [properties] Properties to set @@ -2027,124 +1841,236 @@ export namespace google { } } - /** Properties of an ApplicationSettings. */ - interface IApplicationSettings { - - /** ApplicationSettings csmSettings */ - csmSettings?: (google.cloud.iap.v1.ICsmSettings|null); + /** Properties of an AllowedDomainsSettings. */ + interface IAllowedDomainsSettings { - /** ApplicationSettings accessDeniedPageSettings */ - accessDeniedPageSettings?: (google.cloud.iap.v1.IAccessDeniedPageSettings|null); + /** AllowedDomainsSettings enable */ + enable?: (boolean|null); - /** ApplicationSettings cookieDomain */ - cookieDomain?: (google.protobuf.IStringValue|null); + /** AllowedDomainsSettings domains */ + domains?: (string[]|null); } - /** Represents an ApplicationSettings. */ - class ApplicationSettings implements IApplicationSettings { + /** Represents an AllowedDomainsSettings. */ + class AllowedDomainsSettings implements IAllowedDomainsSettings { /** - * Constructs a new ApplicationSettings. + * Constructs a new AllowedDomainsSettings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.iap.v1.IApplicationSettings); + constructor(properties?: google.cloud.iap.v1.IAllowedDomainsSettings); - /** ApplicationSettings csmSettings. */ - public csmSettings?: (google.cloud.iap.v1.ICsmSettings|null); + /** AllowedDomainsSettings enable. */ + public enable?: (boolean|null); - /** ApplicationSettings accessDeniedPageSettings. */ - public accessDeniedPageSettings?: (google.cloud.iap.v1.IAccessDeniedPageSettings|null); + /** AllowedDomainsSettings domains. */ + public domains: string[]; - /** ApplicationSettings cookieDomain. */ - public cookieDomain?: (google.protobuf.IStringValue|null); + /** AllowedDomainsSettings _enable. */ + public _enable?: "enable"; /** - * Creates a new ApplicationSettings instance using the specified properties. + * Creates a new AllowedDomainsSettings instance using the specified properties. * @param [properties] Properties to set - * @returns ApplicationSettings instance + * @returns AllowedDomainsSettings instance */ - public static create(properties?: google.cloud.iap.v1.IApplicationSettings): google.cloud.iap.v1.ApplicationSettings; + public static create(properties?: google.cloud.iap.v1.IAllowedDomainsSettings): google.cloud.iap.v1.AllowedDomainsSettings; /** - * Encodes the specified ApplicationSettings message. Does not implicitly {@link google.cloud.iap.v1.ApplicationSettings.verify|verify} messages. - * @param message ApplicationSettings message or plain object to encode + * Encodes the specified AllowedDomainsSettings message. Does not implicitly {@link google.cloud.iap.v1.AllowedDomainsSettings.verify|verify} messages. + * @param message AllowedDomainsSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.iap.v1.IApplicationSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.iap.v1.IAllowedDomainsSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ApplicationSettings message, length delimited. Does not implicitly {@link google.cloud.iap.v1.ApplicationSettings.verify|verify} messages. - * @param message ApplicationSettings message or plain object to encode + * Encodes the specified AllowedDomainsSettings message, length delimited. Does not implicitly {@link google.cloud.iap.v1.AllowedDomainsSettings.verify|verify} messages. + * @param message AllowedDomainsSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.iap.v1.IApplicationSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.iap.v1.IAllowedDomainsSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ApplicationSettings message from the specified reader or buffer. + * Decodes an AllowedDomainsSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ApplicationSettings + * @returns AllowedDomainsSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iap.v1.ApplicationSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iap.v1.AllowedDomainsSettings; /** - * Decodes an ApplicationSettings message from the specified reader or buffer, length delimited. + * Decodes an AllowedDomainsSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ApplicationSettings + * @returns AllowedDomainsSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iap.v1.ApplicationSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iap.v1.AllowedDomainsSettings; /** - * Verifies an ApplicationSettings message. + * Verifies an AllowedDomainsSettings message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ApplicationSettings message from a plain object. Also converts values to their respective internal types. + * Creates an AllowedDomainsSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ApplicationSettings + * @returns AllowedDomainsSettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.iap.v1.ApplicationSettings; + public static fromObject(object: { [k: string]: any }): google.cloud.iap.v1.AllowedDomainsSettings; /** - * Creates a plain object from an ApplicationSettings message. Also converts values to other types if specified. - * @param message ApplicationSettings + * Creates a plain object from an AllowedDomainsSettings message. Also converts values to other types if specified. + * @param message AllowedDomainsSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.iap.v1.ApplicationSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.iap.v1.AllowedDomainsSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ApplicationSettings to JSON. + * Converts this AllowedDomainsSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ApplicationSettings + * Gets the default type url for AllowedDomainsSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CsmSettings. */ - interface ICsmSettings { + /** Properties of an ApplicationSettings. */ + interface IApplicationSettings { - /** CsmSettings rctokenAud */ - rctokenAud?: (google.protobuf.IStringValue|null); + /** ApplicationSettings csmSettings */ + csmSettings?: (google.cloud.iap.v1.ICsmSettings|null); + + /** ApplicationSettings accessDeniedPageSettings */ + accessDeniedPageSettings?: (google.cloud.iap.v1.IAccessDeniedPageSettings|null); + + /** ApplicationSettings cookieDomain */ + cookieDomain?: (google.protobuf.IStringValue|null); + + /** ApplicationSettings attributePropagationSettings */ + attributePropagationSettings?: (google.cloud.iap.v1.IAttributePropagationSettings|null); } - /** Represents a CsmSettings. */ - class CsmSettings implements ICsmSettings { + /** Represents an ApplicationSettings. */ + class ApplicationSettings implements IApplicationSettings { + + /** + * Constructs a new ApplicationSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iap.v1.IApplicationSettings); + + /** ApplicationSettings csmSettings. */ + public csmSettings?: (google.cloud.iap.v1.ICsmSettings|null); + + /** ApplicationSettings accessDeniedPageSettings. */ + public accessDeniedPageSettings?: (google.cloud.iap.v1.IAccessDeniedPageSettings|null); + + /** ApplicationSettings cookieDomain. */ + public cookieDomain?: (google.protobuf.IStringValue|null); + + /** ApplicationSettings attributePropagationSettings. */ + public attributePropagationSettings?: (google.cloud.iap.v1.IAttributePropagationSettings|null); + + /** + * Creates a new ApplicationSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ApplicationSettings instance + */ + public static create(properties?: google.cloud.iap.v1.IApplicationSettings): google.cloud.iap.v1.ApplicationSettings; + + /** + * Encodes the specified ApplicationSettings message. Does not implicitly {@link google.cloud.iap.v1.ApplicationSettings.verify|verify} messages. + * @param message ApplicationSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iap.v1.IApplicationSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ApplicationSettings message, length delimited. Does not implicitly {@link google.cloud.iap.v1.ApplicationSettings.verify|verify} messages. + * @param message ApplicationSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iap.v1.IApplicationSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ApplicationSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ApplicationSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iap.v1.ApplicationSettings; + + /** + * Decodes an ApplicationSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ApplicationSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iap.v1.ApplicationSettings; + + /** + * Verifies an ApplicationSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ApplicationSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ApplicationSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iap.v1.ApplicationSettings; + + /** + * Creates a plain object from an ApplicationSettings message. Also converts values to other types if specified. + * @param message ApplicationSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iap.v1.ApplicationSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ApplicationSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ApplicationSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CsmSettings. */ + interface ICsmSettings { + + /** CsmSettings rctokenAud */ + rctokenAud?: (google.protobuf.IStringValue|null); + } + + /** Represents a CsmSettings. */ + class CsmSettings implements ICsmSettings { /** * Constructs a new CsmSettings. @@ -2241,6 +2167,9 @@ export namespace google { /** AccessDeniedPageSettings generateTroubleshootingUri */ generateTroubleshootingUri?: (google.protobuf.IBoolValue|null); + + /** AccessDeniedPageSettings remediationTokenGenerationEnabled */ + remediationTokenGenerationEnabled?: (google.protobuf.IBoolValue|null); } /** Represents an AccessDeniedPageSettings. */ @@ -2258,6 +2187,12 @@ export namespace google { /** AccessDeniedPageSettings generateTroubleshootingUri. */ public generateTroubleshootingUri?: (google.protobuf.IBoolValue|null); + /** AccessDeniedPageSettings remediationTokenGenerationEnabled. */ + public remediationTokenGenerationEnabled?: (google.protobuf.IBoolValue|null); + + /** AccessDeniedPageSettings _remediationTokenGenerationEnabled. */ + public _remediationTokenGenerationEnabled?: "remediationTokenGenerationEnabled"; + /** * Creates a new AccessDeniedPageSettings instance using the specified properties. * @param [properties] Properties to set @@ -2336,6 +2271,324 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an AttributePropagationSettings. */ + interface IAttributePropagationSettings { + + /** AttributePropagationSettings expression */ + expression?: (string|null); + + /** AttributePropagationSettings outputCredentials */ + outputCredentials?: (google.cloud.iap.v1.AttributePropagationSettings.OutputCredentials[]|null); + + /** AttributePropagationSettings enable */ + enable?: (boolean|null); + } + + /** Represents an AttributePropagationSettings. */ + class AttributePropagationSettings implements IAttributePropagationSettings { + + /** + * Constructs a new AttributePropagationSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.iap.v1.IAttributePropagationSettings); + + /** AttributePropagationSettings expression. */ + public expression?: (string|null); + + /** AttributePropagationSettings outputCredentials. */ + public outputCredentials: google.cloud.iap.v1.AttributePropagationSettings.OutputCredentials[]; + + /** AttributePropagationSettings enable. */ + public enable?: (boolean|null); + + /** AttributePropagationSettings _expression. */ + public _expression?: "expression"; + + /** AttributePropagationSettings _enable. */ + public _enable?: "enable"; + + /** + * Creates a new AttributePropagationSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns AttributePropagationSettings instance + */ + public static create(properties?: google.cloud.iap.v1.IAttributePropagationSettings): google.cloud.iap.v1.AttributePropagationSettings; + + /** + * Encodes the specified AttributePropagationSettings message. Does not implicitly {@link google.cloud.iap.v1.AttributePropagationSettings.verify|verify} messages. + * @param message AttributePropagationSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.iap.v1.IAttributePropagationSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AttributePropagationSettings message, length delimited. Does not implicitly {@link google.cloud.iap.v1.AttributePropagationSettings.verify|verify} messages. + * @param message AttributePropagationSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.iap.v1.IAttributePropagationSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AttributePropagationSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AttributePropagationSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.iap.v1.AttributePropagationSettings; + + /** + * Decodes an AttributePropagationSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AttributePropagationSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.iap.v1.AttributePropagationSettings; + + /** + * Verifies an AttributePropagationSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AttributePropagationSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AttributePropagationSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.iap.v1.AttributePropagationSettings; + + /** + * Creates a plain object from an AttributePropagationSettings message. Also converts values to other types if specified. + * @param message AttributePropagationSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.iap.v1.AttributePropagationSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AttributePropagationSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AttributePropagationSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AttributePropagationSettings { + + /** OutputCredentials enum. */ + enum OutputCredentials { + OUTPUT_CREDENTIALS_UNSPECIFIED = 0, + HEADER = 1, + JWT = 2, + RCTOKEN = 3 + } + } + + /** Represents an IdentityAwareProxyOAuthService */ + class IdentityAwareProxyOAuthService extends $protobuf.rpc.Service { + + /** + * Constructs a new IdentityAwareProxyOAuthService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new IdentityAwareProxyOAuthService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): IdentityAwareProxyOAuthService; + + /** + * Calls ListBrands. + * @param request ListBrandsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBrandsResponse + */ + public listBrands(request: google.cloud.iap.v1.IListBrandsRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.ListBrandsCallback): void; + + /** + * Calls ListBrands. + * @param request ListBrandsRequest message or plain object + * @returns Promise + */ + public listBrands(request: google.cloud.iap.v1.IListBrandsRequest): Promise; + + /** + * Calls CreateBrand. + * @param request CreateBrandRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Brand + */ + public createBrand(request: google.cloud.iap.v1.ICreateBrandRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.CreateBrandCallback): void; + + /** + * Calls CreateBrand. + * @param request CreateBrandRequest message or plain object + * @returns Promise + */ + public createBrand(request: google.cloud.iap.v1.ICreateBrandRequest): Promise; + + /** + * Calls GetBrand. + * @param request GetBrandRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Brand + */ + public getBrand(request: google.cloud.iap.v1.IGetBrandRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.GetBrandCallback): void; + + /** + * Calls GetBrand. + * @param request GetBrandRequest message or plain object + * @returns Promise + */ + public getBrand(request: google.cloud.iap.v1.IGetBrandRequest): Promise; + + /** + * Calls CreateIdentityAwareProxyClient. + * @param request CreateIdentityAwareProxyClientRequest message or plain object + * @param callback Node-style callback called with the error, if any, and IdentityAwareProxyClient + */ + public createIdentityAwareProxyClient(request: google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.CreateIdentityAwareProxyClientCallback): void; + + /** + * Calls CreateIdentityAwareProxyClient. + * @param request CreateIdentityAwareProxyClientRequest message or plain object + * @returns Promise + */ + public createIdentityAwareProxyClient(request: google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest): Promise; + + /** + * Calls ListIdentityAwareProxyClients. + * @param request ListIdentityAwareProxyClientsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListIdentityAwareProxyClientsResponse + */ + public listIdentityAwareProxyClients(request: google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.ListIdentityAwareProxyClientsCallback): void; + + /** + * Calls ListIdentityAwareProxyClients. + * @param request ListIdentityAwareProxyClientsRequest message or plain object + * @returns Promise + */ + public listIdentityAwareProxyClients(request: google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest): Promise; + + /** + * Calls GetIdentityAwareProxyClient. + * @param request GetIdentityAwareProxyClientRequest message or plain object + * @param callback Node-style callback called with the error, if any, and IdentityAwareProxyClient + */ + public getIdentityAwareProxyClient(request: google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.GetIdentityAwareProxyClientCallback): void; + + /** + * Calls GetIdentityAwareProxyClient. + * @param request GetIdentityAwareProxyClientRequest message or plain object + * @returns Promise + */ + public getIdentityAwareProxyClient(request: google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest): Promise; + + /** + * Calls ResetIdentityAwareProxyClientSecret. + * @param request ResetIdentityAwareProxyClientSecretRequest message or plain object + * @param callback Node-style callback called with the error, if any, and IdentityAwareProxyClient + */ + public resetIdentityAwareProxyClientSecret(request: google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.ResetIdentityAwareProxyClientSecretCallback): void; + + /** + * Calls ResetIdentityAwareProxyClientSecret. + * @param request ResetIdentityAwareProxyClientSecretRequest message or plain object + * @returns Promise + */ + public resetIdentityAwareProxyClientSecret(request: google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest): Promise; + + /** + * Calls DeleteIdentityAwareProxyClient. + * @param request DeleteIdentityAwareProxyClientRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteIdentityAwareProxyClient(request: google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.DeleteIdentityAwareProxyClientCallback): void; + + /** + * Calls DeleteIdentityAwareProxyClient. + * @param request DeleteIdentityAwareProxyClientRequest message or plain object + * @returns Promise + */ + public deleteIdentityAwareProxyClient(request: google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest): Promise; + } + + namespace IdentityAwareProxyOAuthService { + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|listBrands}. + * @param error Error, if any + * @param [response] ListBrandsResponse + */ + type ListBrandsCallback = (error: (Error|null), response?: google.cloud.iap.v1.ListBrandsResponse) => void; + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|createBrand}. + * @param error Error, if any + * @param [response] Brand + */ + type CreateBrandCallback = (error: (Error|null), response?: google.cloud.iap.v1.Brand) => void; + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|getBrand}. + * @param error Error, if any + * @param [response] Brand + */ + type GetBrandCallback = (error: (Error|null), response?: google.cloud.iap.v1.Brand) => void; + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|createIdentityAwareProxyClient}. + * @param error Error, if any + * @param [response] IdentityAwareProxyClient + */ + type CreateIdentityAwareProxyClientCallback = (error: (Error|null), response?: google.cloud.iap.v1.IdentityAwareProxyClient) => void; + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|listIdentityAwareProxyClients}. + * @param error Error, if any + * @param [response] ListIdentityAwareProxyClientsResponse + */ + type ListIdentityAwareProxyClientsCallback = (error: (Error|null), response?: google.cloud.iap.v1.ListIdentityAwareProxyClientsResponse) => void; + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|getIdentityAwareProxyClient}. + * @param error Error, if any + * @param [response] IdentityAwareProxyClient + */ + type GetIdentityAwareProxyClientCallback = (error: (Error|null), response?: google.cloud.iap.v1.IdentityAwareProxyClient) => void; + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|resetIdentityAwareProxyClientSecret}. + * @param error Error, if any + * @param [response] IdentityAwareProxyClient + */ + type ResetIdentityAwareProxyClientSecretCallback = (error: (Error|null), response?: google.cloud.iap.v1.IdentityAwareProxyClient) => void; + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|deleteIdentityAwareProxyClient}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteIdentityAwareProxyClientCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + /** Properties of a ListBrandsRequest. */ interface IListBrandsRequest { diff --git a/packages/google-cloud-iap/protos/protos.js b/packages/google-cloud-iap/protos/protos.js index 59bc3784ef5..45cf505263c 100644 --- a/packages/google-cloud-iap/protos/protos.js +++ b/packages/google-cloud-iap/protos/protos.js @@ -2110,323 +2110,228 @@ return TunnelDestGroup; })(); - v1.IdentityAwareProxyOAuthService = (function() { + v1.GetIapSettingsRequest = (function() { /** - * Constructs a new IdentityAwareProxyOAuthService service. + * Properties of a GetIapSettingsRequest. * @memberof google.cloud.iap.v1 - * @classdesc Represents an IdentityAwareProxyOAuthService - * @extends $protobuf.rpc.Service + * @interface IGetIapSettingsRequest + * @property {string|null} [name] GetIapSettingsRequest name + */ + + /** + * Constructs a new GetIapSettingsRequest. + * @memberof google.cloud.iap.v1 + * @classdesc Represents a GetIapSettingsRequest. + * @implements IGetIapSettingsRequest * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @param {google.cloud.iap.v1.IGetIapSettingsRequest=} [properties] Properties to set */ - function IdentityAwareProxyOAuthService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function GetIapSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - (IdentityAwareProxyOAuthService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = IdentityAwareProxyOAuthService; + /** + * GetIapSettingsRequest name. + * @member {string} name + * @memberof google.cloud.iap.v1.GetIapSettingsRequest + * @instance + */ + GetIapSettingsRequest.prototype.name = ""; /** - * Creates new IdentityAwareProxyOAuthService service using the specified rpc implementation. + * Creates a new GetIapSettingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @memberof google.cloud.iap.v1.GetIapSettingsRequest * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {IdentityAwareProxyOAuthService} RPC service. Useful where requests and/or responses are streamed. + * @param {google.cloud.iap.v1.IGetIapSettingsRequest=} [properties] Properties to set + * @returns {google.cloud.iap.v1.GetIapSettingsRequest} GetIapSettingsRequest instance */ - IdentityAwareProxyOAuthService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + GetIapSettingsRequest.create = function create(properties) { + return new GetIapSettingsRequest(properties); }; /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|listBrands}. - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @typedef ListBrandsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iap.v1.ListBrandsResponse} [response] ListBrandsResponse + * Encodes the specified GetIapSettingsRequest message. Does not implicitly {@link google.cloud.iap.v1.GetIapSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.iap.v1.GetIapSettingsRequest + * @static + * @param {google.cloud.iap.v1.IGetIapSettingsRequest} message GetIapSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + GetIapSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; /** - * Calls ListBrands. - * @function listBrands - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IListBrandsRequest} request ListBrandsRequest message or plain object - * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.ListBrandsCallback} callback Node-style callback called with the error, if any, and ListBrandsResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified GetIapSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.iap.v1.GetIapSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iap.v1.GetIapSettingsRequest + * @static + * @param {google.cloud.iap.v1.IGetIapSettingsRequest} message GetIapSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(IdentityAwareProxyOAuthService.prototype.listBrands = function listBrands(request, callback) { - return this.rpcCall(listBrands, $root.google.cloud.iap.v1.ListBrandsRequest, $root.google.cloud.iap.v1.ListBrandsResponse, request, callback); - }, "name", { value: "ListBrands" }); + GetIapSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls ListBrands. - * @function listBrands - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IListBrandsRequest} request ListBrandsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a GetIapSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iap.v1.GetIapSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iap.v1.GetIapSettingsRequest} GetIapSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetIapSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iap.v1.GetIapSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|createBrand}. - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @typedef CreateBrandCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iap.v1.Brand} [response] Brand + * Decodes a GetIapSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iap.v1.GetIapSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iap.v1.GetIapSettingsRequest} GetIapSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetIapSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls CreateBrand. - * @function createBrand - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.ICreateBrandRequest} request CreateBrandRequest message or plain object - * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.CreateBrandCallback} callback Node-style callback called with the error, if any, and Brand - * @returns {undefined} - * @variation 1 + * Verifies a GetIapSettingsRequest message. + * @function verify + * @memberof google.cloud.iap.v1.GetIapSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(IdentityAwareProxyOAuthService.prototype.createBrand = function createBrand(request, callback) { - return this.rpcCall(createBrand, $root.google.cloud.iap.v1.CreateBrandRequest, $root.google.cloud.iap.v1.Brand, request, callback); - }, "name", { value: "CreateBrand" }); + GetIapSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; /** - * Calls CreateBrand. - * @function createBrand - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.ICreateBrandRequest} request CreateBrandRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a GetIapSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iap.v1.GetIapSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iap.v1.GetIapSettingsRequest} GetIapSettingsRequest */ + GetIapSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iap.v1.GetIapSettingsRequest) + return object; + var message = new $root.google.cloud.iap.v1.GetIapSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|getBrand}. - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @typedef GetBrandCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iap.v1.Brand} [response] Brand + * Creates a plain object from a GetIapSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iap.v1.GetIapSettingsRequest + * @static + * @param {google.cloud.iap.v1.GetIapSettingsRequest} message GetIapSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + GetIapSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; /** - * Calls GetBrand. - * @function getBrand - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * Converts this GetIapSettingsRequest to JSON. + * @function toJSON + * @memberof google.cloud.iap.v1.GetIapSettingsRequest * @instance - * @param {google.cloud.iap.v1.IGetBrandRequest} request GetBrandRequest message or plain object - * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.GetBrandCallback} callback Node-style callback called with the error, if any, and Brand - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(IdentityAwareProxyOAuthService.prototype.getBrand = function getBrand(request, callback) { - return this.rpcCall(getBrand, $root.google.cloud.iap.v1.GetBrandRequest, $root.google.cloud.iap.v1.Brand, request, callback); - }, "name", { value: "GetBrand" }); + GetIapSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls GetBrand. - * @function getBrand - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IGetBrandRequest} request GetBrandRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for GetIapSettingsRequest + * @function getTypeUrl + * @memberof google.cloud.iap.v1.GetIapSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + GetIapSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iap.v1.GetIapSettingsRequest"; + }; + + return GetIapSettingsRequest; + })(); + + v1.UpdateIapSettingsRequest = (function() { /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|createIdentityAwareProxyClient}. - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @typedef CreateIdentityAwareProxyClientCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iap.v1.IdentityAwareProxyClient} [response] IdentityAwareProxyClient - */ - - /** - * Calls CreateIdentityAwareProxyClient. - * @function createIdentityAwareProxyClient - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest} request CreateIdentityAwareProxyClientRequest message or plain object - * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.CreateIdentityAwareProxyClientCallback} callback Node-style callback called with the error, if any, and IdentityAwareProxyClient - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IdentityAwareProxyOAuthService.prototype.createIdentityAwareProxyClient = function createIdentityAwareProxyClient(request, callback) { - return this.rpcCall(createIdentityAwareProxyClient, $root.google.cloud.iap.v1.CreateIdentityAwareProxyClientRequest, $root.google.cloud.iap.v1.IdentityAwareProxyClient, request, callback); - }, "name", { value: "CreateIdentityAwareProxyClient" }); - - /** - * Calls CreateIdentityAwareProxyClient. - * @function createIdentityAwareProxyClient - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest} request CreateIdentityAwareProxyClientRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|listIdentityAwareProxyClients}. - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @typedef ListIdentityAwareProxyClientsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iap.v1.ListIdentityAwareProxyClientsResponse} [response] ListIdentityAwareProxyClientsResponse - */ - - /** - * Calls ListIdentityAwareProxyClients. - * @function listIdentityAwareProxyClients - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest} request ListIdentityAwareProxyClientsRequest message or plain object - * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.ListIdentityAwareProxyClientsCallback} callback Node-style callback called with the error, if any, and ListIdentityAwareProxyClientsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IdentityAwareProxyOAuthService.prototype.listIdentityAwareProxyClients = function listIdentityAwareProxyClients(request, callback) { - return this.rpcCall(listIdentityAwareProxyClients, $root.google.cloud.iap.v1.ListIdentityAwareProxyClientsRequest, $root.google.cloud.iap.v1.ListIdentityAwareProxyClientsResponse, request, callback); - }, "name", { value: "ListIdentityAwareProxyClients" }); - - /** - * Calls ListIdentityAwareProxyClients. - * @function listIdentityAwareProxyClients - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest} request ListIdentityAwareProxyClientsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|getIdentityAwareProxyClient}. - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @typedef GetIdentityAwareProxyClientCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iap.v1.IdentityAwareProxyClient} [response] IdentityAwareProxyClient - */ - - /** - * Calls GetIdentityAwareProxyClient. - * @function getIdentityAwareProxyClient - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest} request GetIdentityAwareProxyClientRequest message or plain object - * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.GetIdentityAwareProxyClientCallback} callback Node-style callback called with the error, if any, and IdentityAwareProxyClient - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IdentityAwareProxyOAuthService.prototype.getIdentityAwareProxyClient = function getIdentityAwareProxyClient(request, callback) { - return this.rpcCall(getIdentityAwareProxyClient, $root.google.cloud.iap.v1.GetIdentityAwareProxyClientRequest, $root.google.cloud.iap.v1.IdentityAwareProxyClient, request, callback); - }, "name", { value: "GetIdentityAwareProxyClient" }); - - /** - * Calls GetIdentityAwareProxyClient. - * @function getIdentityAwareProxyClient - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest} request GetIdentityAwareProxyClientRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|resetIdentityAwareProxyClientSecret}. - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @typedef ResetIdentityAwareProxyClientSecretCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iap.v1.IdentityAwareProxyClient} [response] IdentityAwareProxyClient - */ - - /** - * Calls ResetIdentityAwareProxyClientSecret. - * @function resetIdentityAwareProxyClientSecret - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest} request ResetIdentityAwareProxyClientSecretRequest message or plain object - * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.ResetIdentityAwareProxyClientSecretCallback} callback Node-style callback called with the error, if any, and IdentityAwareProxyClient - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IdentityAwareProxyOAuthService.prototype.resetIdentityAwareProxyClientSecret = function resetIdentityAwareProxyClientSecret(request, callback) { - return this.rpcCall(resetIdentityAwareProxyClientSecret, $root.google.cloud.iap.v1.ResetIdentityAwareProxyClientSecretRequest, $root.google.cloud.iap.v1.IdentityAwareProxyClient, request, callback); - }, "name", { value: "ResetIdentityAwareProxyClientSecret" }); - - /** - * Calls ResetIdentityAwareProxyClientSecret. - * @function resetIdentityAwareProxyClientSecret - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest} request ResetIdentityAwareProxyClientSecretRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|deleteIdentityAwareProxyClient}. - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @typedef DeleteIdentityAwareProxyClientCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteIdentityAwareProxyClient. - * @function deleteIdentityAwareProxyClient - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest} request DeleteIdentityAwareProxyClientRequest message or plain object - * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.DeleteIdentityAwareProxyClientCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IdentityAwareProxyOAuthService.prototype.deleteIdentityAwareProxyClient = function deleteIdentityAwareProxyClient(request, callback) { - return this.rpcCall(deleteIdentityAwareProxyClient, $root.google.cloud.iap.v1.DeleteIdentityAwareProxyClientRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteIdentityAwareProxyClient" }); - - /** - * Calls DeleteIdentityAwareProxyClient. - * @function deleteIdentityAwareProxyClient - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest} request DeleteIdentityAwareProxyClientRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return IdentityAwareProxyOAuthService; - })(); - - v1.GetIapSettingsRequest = (function() { - - /** - * Properties of a GetIapSettingsRequest. + * Properties of an UpdateIapSettingsRequest. * @memberof google.cloud.iap.v1 - * @interface IGetIapSettingsRequest - * @property {string|null} [name] GetIapSettingsRequest name + * @interface IUpdateIapSettingsRequest + * @property {google.cloud.iap.v1.IIapSettings|null} [iapSettings] UpdateIapSettingsRequest iapSettings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateIapSettingsRequest updateMask */ /** - * Constructs a new GetIapSettingsRequest. + * Constructs a new UpdateIapSettingsRequest. * @memberof google.cloud.iap.v1 - * @classdesc Represents a GetIapSettingsRequest. - * @implements IGetIapSettingsRequest + * @classdesc Represents an UpdateIapSettingsRequest. + * @implements IUpdateIapSettingsRequest * @constructor - * @param {google.cloud.iap.v1.IGetIapSettingsRequest=} [properties] Properties to set + * @param {google.cloud.iap.v1.IUpdateIapSettingsRequest=} [properties] Properties to set */ - function GetIapSettingsRequest(properties) { + function UpdateIapSettingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2434,75 +2339,89 @@ } /** - * GetIapSettingsRequest name. - * @member {string} name - * @memberof google.cloud.iap.v1.GetIapSettingsRequest + * UpdateIapSettingsRequest iapSettings. + * @member {google.cloud.iap.v1.IIapSettings|null|undefined} iapSettings + * @memberof google.cloud.iap.v1.UpdateIapSettingsRequest * @instance */ - GetIapSettingsRequest.prototype.name = ""; + UpdateIapSettingsRequest.prototype.iapSettings = null; /** - * Creates a new GetIapSettingsRequest instance using the specified properties. + * UpdateIapSettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.iap.v1.UpdateIapSettingsRequest + * @instance + */ + UpdateIapSettingsRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateIapSettingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.iap.v1.GetIapSettingsRequest + * @memberof google.cloud.iap.v1.UpdateIapSettingsRequest * @static - * @param {google.cloud.iap.v1.IGetIapSettingsRequest=} [properties] Properties to set - * @returns {google.cloud.iap.v1.GetIapSettingsRequest} GetIapSettingsRequest instance + * @param {google.cloud.iap.v1.IUpdateIapSettingsRequest=} [properties] Properties to set + * @returns {google.cloud.iap.v1.UpdateIapSettingsRequest} UpdateIapSettingsRequest instance */ - GetIapSettingsRequest.create = function create(properties) { - return new GetIapSettingsRequest(properties); + UpdateIapSettingsRequest.create = function create(properties) { + return new UpdateIapSettingsRequest(properties); }; /** - * Encodes the specified GetIapSettingsRequest message. Does not implicitly {@link google.cloud.iap.v1.GetIapSettingsRequest.verify|verify} messages. + * Encodes the specified UpdateIapSettingsRequest message. Does not implicitly {@link google.cloud.iap.v1.UpdateIapSettingsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iap.v1.GetIapSettingsRequest + * @memberof google.cloud.iap.v1.UpdateIapSettingsRequest * @static - * @param {google.cloud.iap.v1.IGetIapSettingsRequest} message GetIapSettingsRequest message or plain object to encode + * @param {google.cloud.iap.v1.IUpdateIapSettingsRequest} message UpdateIapSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetIapSettingsRequest.encode = function encode(message, writer) { + UpdateIapSettingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.iapSettings != null && Object.hasOwnProperty.call(message, "iapSettings")) + $root.google.cloud.iap.v1.IapSettings.encode(message.iapSettings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetIapSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.iap.v1.GetIapSettingsRequest.verify|verify} messages. + * Encodes the specified UpdateIapSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.iap.v1.UpdateIapSettingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.iap.v1.GetIapSettingsRequest + * @memberof google.cloud.iap.v1.UpdateIapSettingsRequest * @static - * @param {google.cloud.iap.v1.IGetIapSettingsRequest} message GetIapSettingsRequest message or plain object to encode + * @param {google.cloud.iap.v1.IUpdateIapSettingsRequest} message UpdateIapSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetIapSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateIapSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetIapSettingsRequest message from the specified reader or buffer. + * Decodes an UpdateIapSettingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.iap.v1.GetIapSettingsRequest + * @memberof google.cloud.iap.v1.UpdateIapSettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iap.v1.GetIapSettingsRequest} GetIapSettingsRequest + * @returns {google.cloud.iap.v1.UpdateIapSettingsRequest} UpdateIapSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetIapSettingsRequest.decode = function decode(reader, length) { + UpdateIapSettingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iap.v1.GetIapSettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iap.v1.UpdateIapSettingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.iapSettings = $root.google.cloud.iap.v1.IapSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -2514,230 +2433,12 @@ }; /** - * Decodes a GetIapSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateIapSettingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.iap.v1.GetIapSettingsRequest + * @memberof google.cloud.iap.v1.UpdateIapSettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iap.v1.GetIapSettingsRequest} GetIapSettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetIapSettingsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetIapSettingsRequest message. - * @function verify - * @memberof google.cloud.iap.v1.GetIapSettingsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetIapSettingsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetIapSettingsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.iap.v1.GetIapSettingsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.iap.v1.GetIapSettingsRequest} GetIapSettingsRequest - */ - GetIapSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iap.v1.GetIapSettingsRequest) - return object; - var message = new $root.google.cloud.iap.v1.GetIapSettingsRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetIapSettingsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.iap.v1.GetIapSettingsRequest - * @static - * @param {google.cloud.iap.v1.GetIapSettingsRequest} message GetIapSettingsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetIapSettingsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetIapSettingsRequest to JSON. - * @function toJSON - * @memberof google.cloud.iap.v1.GetIapSettingsRequest - * @instance - * @returns {Object.} JSON object - */ - GetIapSettingsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetIapSettingsRequest - * @function getTypeUrl - * @memberof google.cloud.iap.v1.GetIapSettingsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetIapSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.iap.v1.GetIapSettingsRequest"; - }; - - return GetIapSettingsRequest; - })(); - - v1.UpdateIapSettingsRequest = (function() { - - /** - * Properties of an UpdateIapSettingsRequest. - * @memberof google.cloud.iap.v1 - * @interface IUpdateIapSettingsRequest - * @property {google.cloud.iap.v1.IIapSettings|null} [iapSettings] UpdateIapSettingsRequest iapSettings - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateIapSettingsRequest updateMask - */ - - /** - * Constructs a new UpdateIapSettingsRequest. - * @memberof google.cloud.iap.v1 - * @classdesc Represents an UpdateIapSettingsRequest. - * @implements IUpdateIapSettingsRequest - * @constructor - * @param {google.cloud.iap.v1.IUpdateIapSettingsRequest=} [properties] Properties to set - */ - function UpdateIapSettingsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateIapSettingsRequest iapSettings. - * @member {google.cloud.iap.v1.IIapSettings|null|undefined} iapSettings - * @memberof google.cloud.iap.v1.UpdateIapSettingsRequest - * @instance - */ - UpdateIapSettingsRequest.prototype.iapSettings = null; - - /** - * UpdateIapSettingsRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.iap.v1.UpdateIapSettingsRequest - * @instance - */ - UpdateIapSettingsRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateIapSettingsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.iap.v1.UpdateIapSettingsRequest - * @static - * @param {google.cloud.iap.v1.IUpdateIapSettingsRequest=} [properties] Properties to set - * @returns {google.cloud.iap.v1.UpdateIapSettingsRequest} UpdateIapSettingsRequest instance - */ - UpdateIapSettingsRequest.create = function create(properties) { - return new UpdateIapSettingsRequest(properties); - }; - - /** - * Encodes the specified UpdateIapSettingsRequest message. Does not implicitly {@link google.cloud.iap.v1.UpdateIapSettingsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.iap.v1.UpdateIapSettingsRequest - * @static - * @param {google.cloud.iap.v1.IUpdateIapSettingsRequest} message UpdateIapSettingsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateIapSettingsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.iapSettings != null && Object.hasOwnProperty.call(message, "iapSettings")) - $root.google.cloud.iap.v1.IapSettings.encode(message.iapSettings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateIapSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.iap.v1.UpdateIapSettingsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.iap.v1.UpdateIapSettingsRequest - * @static - * @param {google.cloud.iap.v1.IUpdateIapSettingsRequest} message UpdateIapSettingsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateIapSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateIapSettingsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.iap.v1.UpdateIapSettingsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iap.v1.UpdateIapSettingsRequest} UpdateIapSettingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateIapSettingsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iap.v1.UpdateIapSettingsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.iapSettings = $root.google.cloud.iap.v1.IapSettings.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateIapSettingsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.iap.v1.UpdateIapSettingsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iap.v1.UpdateIapSettingsRequest} UpdateIapSettingsRequest + * @returns {google.cloud.iap.v1.UpdateIapSettingsRequest} UpdateIapSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ @@ -3119,6 +2820,7 @@ * @property {google.cloud.iap.v1.ICorsSettings|null} [corsSettings] AccessSettings corsSettings * @property {google.cloud.iap.v1.IOAuthSettings|null} [oauthSettings] AccessSettings oauthSettings * @property {google.cloud.iap.v1.IReauthSettings|null} [reauthSettings] AccessSettings reauthSettings + * @property {google.cloud.iap.v1.IAllowedDomainsSettings|null} [allowedDomainsSettings] AccessSettings allowedDomainsSettings */ /** @@ -3168,6 +2870,14 @@ */ AccessSettings.prototype.reauthSettings = null; + /** + * AccessSettings allowedDomainsSettings. + * @member {google.cloud.iap.v1.IAllowedDomainsSettings|null|undefined} allowedDomainsSettings + * @memberof google.cloud.iap.v1.AccessSettings + * @instance + */ + AccessSettings.prototype.allowedDomainsSettings = null; + /** * Creates a new AccessSettings instance using the specified properties. * @function create @@ -3200,6 +2910,8 @@ $root.google.cloud.iap.v1.OAuthSettings.encode(message.oauthSettings, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.reauthSettings != null && Object.hasOwnProperty.call(message, "reauthSettings")) $root.google.cloud.iap.v1.ReauthSettings.encode(message.reauthSettings, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.allowedDomainsSettings != null && Object.hasOwnProperty.call(message, "allowedDomainsSettings")) + $root.google.cloud.iap.v1.AllowedDomainsSettings.encode(message.allowedDomainsSettings, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -3250,6 +2962,10 @@ message.reauthSettings = $root.google.cloud.iap.v1.ReauthSettings.decode(reader, reader.uint32()); break; } + case 7: { + message.allowedDomainsSettings = $root.google.cloud.iap.v1.AllowedDomainsSettings.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -3305,6 +3021,11 @@ if (error) return "reauthSettings." + error; } + if (message.allowedDomainsSettings != null && message.hasOwnProperty("allowedDomainsSettings")) { + var error = $root.google.cloud.iap.v1.AllowedDomainsSettings.verify(message.allowedDomainsSettings); + if (error) + return "allowedDomainsSettings." + error; + } return null; }; @@ -3340,6 +3061,11 @@ throw TypeError(".google.cloud.iap.v1.AccessSettings.reauthSettings: object expected"); message.reauthSettings = $root.google.cloud.iap.v1.ReauthSettings.fromObject(object.reauthSettings); } + if (object.allowedDomainsSettings != null) { + if (typeof object.allowedDomainsSettings !== "object") + throw TypeError(".google.cloud.iap.v1.AccessSettings.allowedDomainsSettings: object expected"); + message.allowedDomainsSettings = $root.google.cloud.iap.v1.AllowedDomainsSettings.fromObject(object.allowedDomainsSettings); + } return message; }; @@ -3361,6 +3087,7 @@ object.corsSettings = null; object.oauthSettings = null; object.reauthSettings = null; + object.allowedDomainsSettings = null; } if (message.gcipSettings != null && message.hasOwnProperty("gcipSettings")) object.gcipSettings = $root.google.cloud.iap.v1.GcipSettings.toObject(message.gcipSettings, options); @@ -3370,6 +3097,8 @@ object.oauthSettings = $root.google.cloud.iap.v1.OAuthSettings.toObject(message.oauthSettings, options); if (message.reauthSettings != null && message.hasOwnProperty("reauthSettings")) object.reauthSettings = $root.google.cloud.iap.v1.ReauthSettings.toObject(message.reauthSettings, options); + if (message.allowedDomainsSettings != null && message.hasOwnProperty("allowedDomainsSettings")) + object.allowedDomainsSettings = $root.google.cloud.iap.v1.AllowedDomainsSettings.toObject(message.allowedDomainsSettings, options); return object; }; @@ -4408,26 +4137,26 @@ return ReauthSettings; })(); - v1.ApplicationSettings = (function() { + v1.AllowedDomainsSettings = (function() { /** - * Properties of an ApplicationSettings. + * Properties of an AllowedDomainsSettings. * @memberof google.cloud.iap.v1 - * @interface IApplicationSettings - * @property {google.cloud.iap.v1.ICsmSettings|null} [csmSettings] ApplicationSettings csmSettings - * @property {google.cloud.iap.v1.IAccessDeniedPageSettings|null} [accessDeniedPageSettings] ApplicationSettings accessDeniedPageSettings - * @property {google.protobuf.IStringValue|null} [cookieDomain] ApplicationSettings cookieDomain + * @interface IAllowedDomainsSettings + * @property {boolean|null} [enable] AllowedDomainsSettings enable + * @property {Array.|null} [domains] AllowedDomainsSettings domains */ /** - * Constructs a new ApplicationSettings. + * Constructs a new AllowedDomainsSettings. * @memberof google.cloud.iap.v1 - * @classdesc Represents an ApplicationSettings. - * @implements IApplicationSettings + * @classdesc Represents an AllowedDomainsSettings. + * @implements IAllowedDomainsSettings * @constructor - * @param {google.cloud.iap.v1.IApplicationSettings=} [properties] Properties to set + * @param {google.cloud.iap.v1.IAllowedDomainsSettings=} [properties] Properties to set */ - function ApplicationSettings(properties) { + function AllowedDomainsSettings(properties) { + this.domains = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4435,38 +4164,308 @@ } /** - * ApplicationSettings csmSettings. - * @member {google.cloud.iap.v1.ICsmSettings|null|undefined} csmSettings - * @memberof google.cloud.iap.v1.ApplicationSettings + * AllowedDomainsSettings enable. + * @member {boolean|null|undefined} enable + * @memberof google.cloud.iap.v1.AllowedDomainsSettings * @instance */ - ApplicationSettings.prototype.csmSettings = null; + AllowedDomainsSettings.prototype.enable = null; /** - * ApplicationSettings accessDeniedPageSettings. - * @member {google.cloud.iap.v1.IAccessDeniedPageSettings|null|undefined} accessDeniedPageSettings - * @memberof google.cloud.iap.v1.ApplicationSettings + * AllowedDomainsSettings domains. + * @member {Array.} domains + * @memberof google.cloud.iap.v1.AllowedDomainsSettings * @instance */ - ApplicationSettings.prototype.accessDeniedPageSettings = null; + AllowedDomainsSettings.prototype.domains = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ApplicationSettings cookieDomain. - * @member {google.protobuf.IStringValue|null|undefined} cookieDomain - * @memberof google.cloud.iap.v1.ApplicationSettings + * AllowedDomainsSettings _enable. + * @member {"enable"|undefined} _enable + * @memberof google.cloud.iap.v1.AllowedDomainsSettings * @instance */ - ApplicationSettings.prototype.cookieDomain = null; + Object.defineProperty(AllowedDomainsSettings.prototype, "_enable", { + get: $util.oneOfGetter($oneOfFields = ["enable"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ApplicationSettings instance using the specified properties. + * Creates a new AllowedDomainsSettings instance using the specified properties. * @function create - * @memberof google.cloud.iap.v1.ApplicationSettings + * @memberof google.cloud.iap.v1.AllowedDomainsSettings * @static - * @param {google.cloud.iap.v1.IApplicationSettings=} [properties] Properties to set - * @returns {google.cloud.iap.v1.ApplicationSettings} ApplicationSettings instance + * @param {google.cloud.iap.v1.IAllowedDomainsSettings=} [properties] Properties to set + * @returns {google.cloud.iap.v1.AllowedDomainsSettings} AllowedDomainsSettings instance */ - ApplicationSettings.create = function create(properties) { + AllowedDomainsSettings.create = function create(properties) { + return new AllowedDomainsSettings(properties); + }; + + /** + * Encodes the specified AllowedDomainsSettings message. Does not implicitly {@link google.cloud.iap.v1.AllowedDomainsSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.iap.v1.AllowedDomainsSettings + * @static + * @param {google.cloud.iap.v1.IAllowedDomainsSettings} message AllowedDomainsSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllowedDomainsSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enable != null && Object.hasOwnProperty.call(message, "enable")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enable); + if (message.domains != null && message.domains.length) + for (var i = 0; i < message.domains.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.domains[i]); + return writer; + }; + + /** + * Encodes the specified AllowedDomainsSettings message, length delimited. Does not implicitly {@link google.cloud.iap.v1.AllowedDomainsSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iap.v1.AllowedDomainsSettings + * @static + * @param {google.cloud.iap.v1.IAllowedDomainsSettings} message AllowedDomainsSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllowedDomainsSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AllowedDomainsSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iap.v1.AllowedDomainsSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iap.v1.AllowedDomainsSettings} AllowedDomainsSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllowedDomainsSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iap.v1.AllowedDomainsSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enable = reader.bool(); + break; + } + case 2: { + if (!(message.domains && message.domains.length)) + message.domains = []; + message.domains.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AllowedDomainsSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iap.v1.AllowedDomainsSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iap.v1.AllowedDomainsSettings} AllowedDomainsSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllowedDomainsSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AllowedDomainsSettings message. + * @function verify + * @memberof google.cloud.iap.v1.AllowedDomainsSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AllowedDomainsSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enable != null && message.hasOwnProperty("enable")) { + properties._enable = 1; + if (typeof message.enable !== "boolean") + return "enable: boolean expected"; + } + if (message.domains != null && message.hasOwnProperty("domains")) { + if (!Array.isArray(message.domains)) + return "domains: array expected"; + for (var i = 0; i < message.domains.length; ++i) + if (!$util.isString(message.domains[i])) + return "domains: string[] expected"; + } + return null; + }; + + /** + * Creates an AllowedDomainsSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iap.v1.AllowedDomainsSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iap.v1.AllowedDomainsSettings} AllowedDomainsSettings + */ + AllowedDomainsSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iap.v1.AllowedDomainsSettings) + return object; + var message = new $root.google.cloud.iap.v1.AllowedDomainsSettings(); + if (object.enable != null) + message.enable = Boolean(object.enable); + if (object.domains) { + if (!Array.isArray(object.domains)) + throw TypeError(".google.cloud.iap.v1.AllowedDomainsSettings.domains: array expected"); + message.domains = []; + for (var i = 0; i < object.domains.length; ++i) + message.domains[i] = String(object.domains[i]); + } + return message; + }; + + /** + * Creates a plain object from an AllowedDomainsSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iap.v1.AllowedDomainsSettings + * @static + * @param {google.cloud.iap.v1.AllowedDomainsSettings} message AllowedDomainsSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AllowedDomainsSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.domains = []; + if (message.enable != null && message.hasOwnProperty("enable")) { + object.enable = message.enable; + if (options.oneofs) + object._enable = "enable"; + } + if (message.domains && message.domains.length) { + object.domains = []; + for (var j = 0; j < message.domains.length; ++j) + object.domains[j] = message.domains[j]; + } + return object; + }; + + /** + * Converts this AllowedDomainsSettings to JSON. + * @function toJSON + * @memberof google.cloud.iap.v1.AllowedDomainsSettings + * @instance + * @returns {Object.} JSON object + */ + AllowedDomainsSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AllowedDomainsSettings + * @function getTypeUrl + * @memberof google.cloud.iap.v1.AllowedDomainsSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AllowedDomainsSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iap.v1.AllowedDomainsSettings"; + }; + + return AllowedDomainsSettings; + })(); + + v1.ApplicationSettings = (function() { + + /** + * Properties of an ApplicationSettings. + * @memberof google.cloud.iap.v1 + * @interface IApplicationSettings + * @property {google.cloud.iap.v1.ICsmSettings|null} [csmSettings] ApplicationSettings csmSettings + * @property {google.cloud.iap.v1.IAccessDeniedPageSettings|null} [accessDeniedPageSettings] ApplicationSettings accessDeniedPageSettings + * @property {google.protobuf.IStringValue|null} [cookieDomain] ApplicationSettings cookieDomain + * @property {google.cloud.iap.v1.IAttributePropagationSettings|null} [attributePropagationSettings] ApplicationSettings attributePropagationSettings + */ + + /** + * Constructs a new ApplicationSettings. + * @memberof google.cloud.iap.v1 + * @classdesc Represents an ApplicationSettings. + * @implements IApplicationSettings + * @constructor + * @param {google.cloud.iap.v1.IApplicationSettings=} [properties] Properties to set + */ + function ApplicationSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ApplicationSettings csmSettings. + * @member {google.cloud.iap.v1.ICsmSettings|null|undefined} csmSettings + * @memberof google.cloud.iap.v1.ApplicationSettings + * @instance + */ + ApplicationSettings.prototype.csmSettings = null; + + /** + * ApplicationSettings accessDeniedPageSettings. + * @member {google.cloud.iap.v1.IAccessDeniedPageSettings|null|undefined} accessDeniedPageSettings + * @memberof google.cloud.iap.v1.ApplicationSettings + * @instance + */ + ApplicationSettings.prototype.accessDeniedPageSettings = null; + + /** + * ApplicationSettings cookieDomain. + * @member {google.protobuf.IStringValue|null|undefined} cookieDomain + * @memberof google.cloud.iap.v1.ApplicationSettings + * @instance + */ + ApplicationSettings.prototype.cookieDomain = null; + + /** + * ApplicationSettings attributePropagationSettings. + * @member {google.cloud.iap.v1.IAttributePropagationSettings|null|undefined} attributePropagationSettings + * @memberof google.cloud.iap.v1.ApplicationSettings + * @instance + */ + ApplicationSettings.prototype.attributePropagationSettings = null; + + /** + * Creates a new ApplicationSettings instance using the specified properties. + * @function create + * @memberof google.cloud.iap.v1.ApplicationSettings + * @static + * @param {google.cloud.iap.v1.IApplicationSettings=} [properties] Properties to set + * @returns {google.cloud.iap.v1.ApplicationSettings} ApplicationSettings instance + */ + ApplicationSettings.create = function create(properties) { return new ApplicationSettings(properties); }; @@ -4488,6 +4487,8 @@ $root.google.cloud.iap.v1.AccessDeniedPageSettings.encode(message.accessDeniedPageSettings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.cookieDomain != null && Object.hasOwnProperty.call(message, "cookieDomain")) $root.google.protobuf.StringValue.encode(message.cookieDomain, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.attributePropagationSettings != null && Object.hasOwnProperty.call(message, "attributePropagationSettings")) + $root.google.cloud.iap.v1.AttributePropagationSettings.encode(message.attributePropagationSettings, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -4534,6 +4535,10 @@ message.cookieDomain = $root.google.protobuf.StringValue.decode(reader, reader.uint32()); break; } + case 4: { + message.attributePropagationSettings = $root.google.cloud.iap.v1.AttributePropagationSettings.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -4584,6 +4589,11 @@ if (error) return "cookieDomain." + error; } + if (message.attributePropagationSettings != null && message.hasOwnProperty("attributePropagationSettings")) { + var error = $root.google.cloud.iap.v1.AttributePropagationSettings.verify(message.attributePropagationSettings); + if (error) + return "attributePropagationSettings." + error; + } return null; }; @@ -4614,6 +4624,11 @@ throw TypeError(".google.cloud.iap.v1.ApplicationSettings.cookieDomain: object expected"); message.cookieDomain = $root.google.protobuf.StringValue.fromObject(object.cookieDomain); } + if (object.attributePropagationSettings != null) { + if (typeof object.attributePropagationSettings !== "object") + throw TypeError(".google.cloud.iap.v1.ApplicationSettings.attributePropagationSettings: object expected"); + message.attributePropagationSettings = $root.google.cloud.iap.v1.AttributePropagationSettings.fromObject(object.attributePropagationSettings); + } return message; }; @@ -4634,6 +4649,7 @@ object.csmSettings = null; object.accessDeniedPageSettings = null; object.cookieDomain = null; + object.attributePropagationSettings = null; } if (message.csmSettings != null && message.hasOwnProperty("csmSettings")) object.csmSettings = $root.google.cloud.iap.v1.CsmSettings.toObject(message.csmSettings, options); @@ -4641,6 +4657,8 @@ object.accessDeniedPageSettings = $root.google.cloud.iap.v1.AccessDeniedPageSettings.toObject(message.accessDeniedPageSettings, options); if (message.cookieDomain != null && message.hasOwnProperty("cookieDomain")) object.cookieDomain = $root.google.protobuf.StringValue.toObject(message.cookieDomain, options); + if (message.attributePropagationSettings != null && message.hasOwnProperty("attributePropagationSettings")) + object.attributePropagationSettings = $root.google.cloud.iap.v1.AttributePropagationSettings.toObject(message.attributePropagationSettings, options); return object; }; @@ -4889,6 +4907,7 @@ * @interface IAccessDeniedPageSettings * @property {google.protobuf.IStringValue|null} [accessDeniedPageUri] AccessDeniedPageSettings accessDeniedPageUri * @property {google.protobuf.IBoolValue|null} [generateTroubleshootingUri] AccessDeniedPageSettings generateTroubleshootingUri + * @property {google.protobuf.IBoolValue|null} [remediationTokenGenerationEnabled] AccessDeniedPageSettings remediationTokenGenerationEnabled */ /** @@ -4922,6 +4941,28 @@ */ AccessDeniedPageSettings.prototype.generateTroubleshootingUri = null; + /** + * AccessDeniedPageSettings remediationTokenGenerationEnabled. + * @member {google.protobuf.IBoolValue|null|undefined} remediationTokenGenerationEnabled + * @memberof google.cloud.iap.v1.AccessDeniedPageSettings + * @instance + */ + AccessDeniedPageSettings.prototype.remediationTokenGenerationEnabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AccessDeniedPageSettings _remediationTokenGenerationEnabled. + * @member {"remediationTokenGenerationEnabled"|undefined} _remediationTokenGenerationEnabled + * @memberof google.cloud.iap.v1.AccessDeniedPageSettings + * @instance + */ + Object.defineProperty(AccessDeniedPageSettings.prototype, "_remediationTokenGenerationEnabled", { + get: $util.oneOfGetter($oneOfFields = ["remediationTokenGenerationEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new AccessDeniedPageSettings instance using the specified properties. * @function create @@ -4950,6 +4991,8 @@ $root.google.protobuf.StringValue.encode(message.accessDeniedPageUri, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.generateTroubleshootingUri != null && Object.hasOwnProperty.call(message, "generateTroubleshootingUri")) $root.google.protobuf.BoolValue.encode(message.generateTroubleshootingUri, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.remediationTokenGenerationEnabled != null && Object.hasOwnProperty.call(message, "remediationTokenGenerationEnabled")) + $root.google.protobuf.BoolValue.encode(message.remediationTokenGenerationEnabled, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -4992,6 +5035,10 @@ message.generateTroubleshootingUri = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); break; } + case 3: { + message.remediationTokenGenerationEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -5027,6 +5074,7 @@ AccessDeniedPageSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.accessDeniedPageUri != null && message.hasOwnProperty("accessDeniedPageUri")) { var error = $root.google.protobuf.StringValue.verify(message.accessDeniedPageUri); if (error) @@ -5037,6 +5085,14 @@ if (error) return "generateTroubleshootingUri." + error; } + if (message.remediationTokenGenerationEnabled != null && message.hasOwnProperty("remediationTokenGenerationEnabled")) { + properties._remediationTokenGenerationEnabled = 1; + { + var error = $root.google.protobuf.BoolValue.verify(message.remediationTokenGenerationEnabled); + if (error) + return "remediationTokenGenerationEnabled." + error; + } + } return null; }; @@ -5062,6 +5118,11 @@ throw TypeError(".google.cloud.iap.v1.AccessDeniedPageSettings.generateTroubleshootingUri: object expected"); message.generateTroubleshootingUri = $root.google.protobuf.BoolValue.fromObject(object.generateTroubleshootingUri); } + if (object.remediationTokenGenerationEnabled != null) { + if (typeof object.remediationTokenGenerationEnabled !== "object") + throw TypeError(".google.cloud.iap.v1.AccessDeniedPageSettings.remediationTokenGenerationEnabled: object expected"); + message.remediationTokenGenerationEnabled = $root.google.protobuf.BoolValue.fromObject(object.remediationTokenGenerationEnabled); + } return message; }; @@ -5086,6 +5147,11 @@ object.accessDeniedPageUri = $root.google.protobuf.StringValue.toObject(message.accessDeniedPageUri, options); if (message.generateTroubleshootingUri != null && message.hasOwnProperty("generateTroubleshootingUri")) object.generateTroubleshootingUri = $root.google.protobuf.BoolValue.toObject(message.generateTroubleshootingUri, options); + if (message.remediationTokenGenerationEnabled != null && message.hasOwnProperty("remediationTokenGenerationEnabled")) { + object.remediationTokenGenerationEnabled = $root.google.protobuf.BoolValue.toObject(message.remediationTokenGenerationEnabled, options); + if (options.oneofs) + object._remediationTokenGenerationEnabled = "remediationTokenGenerationEnabled"; + } return object; }; @@ -5118,6 +5184,659 @@ return AccessDeniedPageSettings; })(); + v1.AttributePropagationSettings = (function() { + + /** + * Properties of an AttributePropagationSettings. + * @memberof google.cloud.iap.v1 + * @interface IAttributePropagationSettings + * @property {string|null} [expression] AttributePropagationSettings expression + * @property {Array.|null} [outputCredentials] AttributePropagationSettings outputCredentials + * @property {boolean|null} [enable] AttributePropagationSettings enable + */ + + /** + * Constructs a new AttributePropagationSettings. + * @memberof google.cloud.iap.v1 + * @classdesc Represents an AttributePropagationSettings. + * @implements IAttributePropagationSettings + * @constructor + * @param {google.cloud.iap.v1.IAttributePropagationSettings=} [properties] Properties to set + */ + function AttributePropagationSettings(properties) { + this.outputCredentials = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AttributePropagationSettings expression. + * @member {string|null|undefined} expression + * @memberof google.cloud.iap.v1.AttributePropagationSettings + * @instance + */ + AttributePropagationSettings.prototype.expression = null; + + /** + * AttributePropagationSettings outputCredentials. + * @member {Array.} outputCredentials + * @memberof google.cloud.iap.v1.AttributePropagationSettings + * @instance + */ + AttributePropagationSettings.prototype.outputCredentials = $util.emptyArray; + + /** + * AttributePropagationSettings enable. + * @member {boolean|null|undefined} enable + * @memberof google.cloud.iap.v1.AttributePropagationSettings + * @instance + */ + AttributePropagationSettings.prototype.enable = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AttributePropagationSettings _expression. + * @member {"expression"|undefined} _expression + * @memberof google.cloud.iap.v1.AttributePropagationSettings + * @instance + */ + Object.defineProperty(AttributePropagationSettings.prototype, "_expression", { + get: $util.oneOfGetter($oneOfFields = ["expression"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttributePropagationSettings _enable. + * @member {"enable"|undefined} _enable + * @memberof google.cloud.iap.v1.AttributePropagationSettings + * @instance + */ + Object.defineProperty(AttributePropagationSettings.prototype, "_enable", { + get: $util.oneOfGetter($oneOfFields = ["enable"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AttributePropagationSettings instance using the specified properties. + * @function create + * @memberof google.cloud.iap.v1.AttributePropagationSettings + * @static + * @param {google.cloud.iap.v1.IAttributePropagationSettings=} [properties] Properties to set + * @returns {google.cloud.iap.v1.AttributePropagationSettings} AttributePropagationSettings instance + */ + AttributePropagationSettings.create = function create(properties) { + return new AttributePropagationSettings(properties); + }; + + /** + * Encodes the specified AttributePropagationSettings message. Does not implicitly {@link google.cloud.iap.v1.AttributePropagationSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.iap.v1.AttributePropagationSettings + * @static + * @param {google.cloud.iap.v1.IAttributePropagationSettings} message AttributePropagationSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttributePropagationSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression); + if (message.outputCredentials != null && message.outputCredentials.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.outputCredentials.length; ++i) + writer.int32(message.outputCredentials[i]); + writer.ldelim(); + } + if (message.enable != null && Object.hasOwnProperty.call(message, "enable")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enable); + return writer; + }; + + /** + * Encodes the specified AttributePropagationSettings message, length delimited. Does not implicitly {@link google.cloud.iap.v1.AttributePropagationSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iap.v1.AttributePropagationSettings + * @static + * @param {google.cloud.iap.v1.IAttributePropagationSettings} message AttributePropagationSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttributePropagationSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AttributePropagationSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iap.v1.AttributePropagationSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iap.v1.AttributePropagationSettings} AttributePropagationSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttributePropagationSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iap.v1.AttributePropagationSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.expression = reader.string(); + break; + } + case 2: { + if (!(message.outputCredentials && message.outputCredentials.length)) + message.outputCredentials = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.outputCredentials.push(reader.int32()); + } else + message.outputCredentials.push(reader.int32()); + break; + } + case 3: { + message.enable = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AttributePropagationSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iap.v1.AttributePropagationSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iap.v1.AttributePropagationSettings} AttributePropagationSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttributePropagationSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AttributePropagationSettings message. + * @function verify + * @memberof google.cloud.iap.v1.AttributePropagationSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AttributePropagationSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.expression != null && message.hasOwnProperty("expression")) { + properties._expression = 1; + if (!$util.isString(message.expression)) + return "expression: string expected"; + } + if (message.outputCredentials != null && message.hasOwnProperty("outputCredentials")) { + if (!Array.isArray(message.outputCredentials)) + return "outputCredentials: array expected"; + for (var i = 0; i < message.outputCredentials.length; ++i) + switch (message.outputCredentials[i]) { + default: + return "outputCredentials: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.enable != null && message.hasOwnProperty("enable")) { + properties._enable = 1; + if (typeof message.enable !== "boolean") + return "enable: boolean expected"; + } + return null; + }; + + /** + * Creates an AttributePropagationSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iap.v1.AttributePropagationSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iap.v1.AttributePropagationSettings} AttributePropagationSettings + */ + AttributePropagationSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iap.v1.AttributePropagationSettings) + return object; + var message = new $root.google.cloud.iap.v1.AttributePropagationSettings(); + if (object.expression != null) + message.expression = String(object.expression); + if (object.outputCredentials) { + if (!Array.isArray(object.outputCredentials)) + throw TypeError(".google.cloud.iap.v1.AttributePropagationSettings.outputCredentials: array expected"); + message.outputCredentials = []; + for (var i = 0; i < object.outputCredentials.length; ++i) + switch (object.outputCredentials[i]) { + default: + if (typeof object.outputCredentials[i] === "number") { + message.outputCredentials[i] = object.outputCredentials[i]; + break; + } + case "OUTPUT_CREDENTIALS_UNSPECIFIED": + case 0: + message.outputCredentials[i] = 0; + break; + case "HEADER": + case 1: + message.outputCredentials[i] = 1; + break; + case "JWT": + case 2: + message.outputCredentials[i] = 2; + break; + case "RCTOKEN": + case 3: + message.outputCredentials[i] = 3; + break; + } + } + if (object.enable != null) + message.enable = Boolean(object.enable); + return message; + }; + + /** + * Creates a plain object from an AttributePropagationSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iap.v1.AttributePropagationSettings + * @static + * @param {google.cloud.iap.v1.AttributePropagationSettings} message AttributePropagationSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AttributePropagationSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.outputCredentials = []; + if (message.expression != null && message.hasOwnProperty("expression")) { + object.expression = message.expression; + if (options.oneofs) + object._expression = "expression"; + } + if (message.outputCredentials && message.outputCredentials.length) { + object.outputCredentials = []; + for (var j = 0; j < message.outputCredentials.length; ++j) + object.outputCredentials[j] = options.enums === String ? $root.google.cloud.iap.v1.AttributePropagationSettings.OutputCredentials[message.outputCredentials[j]] === undefined ? message.outputCredentials[j] : $root.google.cloud.iap.v1.AttributePropagationSettings.OutputCredentials[message.outputCredentials[j]] : message.outputCredentials[j]; + } + if (message.enable != null && message.hasOwnProperty("enable")) { + object.enable = message.enable; + if (options.oneofs) + object._enable = "enable"; + } + return object; + }; + + /** + * Converts this AttributePropagationSettings to JSON. + * @function toJSON + * @memberof google.cloud.iap.v1.AttributePropagationSettings + * @instance + * @returns {Object.} JSON object + */ + AttributePropagationSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AttributePropagationSettings + * @function getTypeUrl + * @memberof google.cloud.iap.v1.AttributePropagationSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AttributePropagationSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iap.v1.AttributePropagationSettings"; + }; + + /** + * OutputCredentials enum. + * @name google.cloud.iap.v1.AttributePropagationSettings.OutputCredentials + * @enum {number} + * @property {number} OUTPUT_CREDENTIALS_UNSPECIFIED=0 OUTPUT_CREDENTIALS_UNSPECIFIED value + * @property {number} HEADER=1 HEADER value + * @property {number} JWT=2 JWT value + * @property {number} RCTOKEN=3 RCTOKEN value + */ + AttributePropagationSettings.OutputCredentials = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OUTPUT_CREDENTIALS_UNSPECIFIED"] = 0; + values[valuesById[1] = "HEADER"] = 1; + values[valuesById[2] = "JWT"] = 2; + values[valuesById[3] = "RCTOKEN"] = 3; + return values; + })(); + + return AttributePropagationSettings; + })(); + + v1.IdentityAwareProxyOAuthService = (function() { + + /** + * Constructs a new IdentityAwareProxyOAuthService service. + * @memberof google.cloud.iap.v1 + * @classdesc Represents an IdentityAwareProxyOAuthService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function IdentityAwareProxyOAuthService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (IdentityAwareProxyOAuthService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = IdentityAwareProxyOAuthService; + + /** + * Creates new IdentityAwareProxyOAuthService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {IdentityAwareProxyOAuthService} RPC service. Useful where requests and/or responses are streamed. + */ + IdentityAwareProxyOAuthService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|listBrands}. + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @typedef ListBrandsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iap.v1.ListBrandsResponse} [response] ListBrandsResponse + */ + + /** + * Calls ListBrands. + * @function listBrands + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.IListBrandsRequest} request ListBrandsRequest message or plain object + * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.ListBrandsCallback} callback Node-style callback called with the error, if any, and ListBrandsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IdentityAwareProxyOAuthService.prototype.listBrands = function listBrands(request, callback) { + return this.rpcCall(listBrands, $root.google.cloud.iap.v1.ListBrandsRequest, $root.google.cloud.iap.v1.ListBrandsResponse, request, callback); + }, "name", { value: "ListBrands" }); + + /** + * Calls ListBrands. + * @function listBrands + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.IListBrandsRequest} request ListBrandsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|createBrand}. + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @typedef CreateBrandCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iap.v1.Brand} [response] Brand + */ + + /** + * Calls CreateBrand. + * @function createBrand + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.ICreateBrandRequest} request CreateBrandRequest message or plain object + * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.CreateBrandCallback} callback Node-style callback called with the error, if any, and Brand + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IdentityAwareProxyOAuthService.prototype.createBrand = function createBrand(request, callback) { + return this.rpcCall(createBrand, $root.google.cloud.iap.v1.CreateBrandRequest, $root.google.cloud.iap.v1.Brand, request, callback); + }, "name", { value: "CreateBrand" }); + + /** + * Calls CreateBrand. + * @function createBrand + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.ICreateBrandRequest} request CreateBrandRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|getBrand}. + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @typedef GetBrandCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iap.v1.Brand} [response] Brand + */ + + /** + * Calls GetBrand. + * @function getBrand + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.IGetBrandRequest} request GetBrandRequest message or plain object + * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.GetBrandCallback} callback Node-style callback called with the error, if any, and Brand + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IdentityAwareProxyOAuthService.prototype.getBrand = function getBrand(request, callback) { + return this.rpcCall(getBrand, $root.google.cloud.iap.v1.GetBrandRequest, $root.google.cloud.iap.v1.Brand, request, callback); + }, "name", { value: "GetBrand" }); + + /** + * Calls GetBrand. + * @function getBrand + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.IGetBrandRequest} request GetBrandRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|createIdentityAwareProxyClient}. + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @typedef CreateIdentityAwareProxyClientCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iap.v1.IdentityAwareProxyClient} [response] IdentityAwareProxyClient + */ + + /** + * Calls CreateIdentityAwareProxyClient. + * @function createIdentityAwareProxyClient + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest} request CreateIdentityAwareProxyClientRequest message or plain object + * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.CreateIdentityAwareProxyClientCallback} callback Node-style callback called with the error, if any, and IdentityAwareProxyClient + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IdentityAwareProxyOAuthService.prototype.createIdentityAwareProxyClient = function createIdentityAwareProxyClient(request, callback) { + return this.rpcCall(createIdentityAwareProxyClient, $root.google.cloud.iap.v1.CreateIdentityAwareProxyClientRequest, $root.google.cloud.iap.v1.IdentityAwareProxyClient, request, callback); + }, "name", { value: "CreateIdentityAwareProxyClient" }); + + /** + * Calls CreateIdentityAwareProxyClient. + * @function createIdentityAwareProxyClient + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest} request CreateIdentityAwareProxyClientRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|listIdentityAwareProxyClients}. + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @typedef ListIdentityAwareProxyClientsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iap.v1.ListIdentityAwareProxyClientsResponse} [response] ListIdentityAwareProxyClientsResponse + */ + + /** + * Calls ListIdentityAwareProxyClients. + * @function listIdentityAwareProxyClients + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest} request ListIdentityAwareProxyClientsRequest message or plain object + * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.ListIdentityAwareProxyClientsCallback} callback Node-style callback called with the error, if any, and ListIdentityAwareProxyClientsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IdentityAwareProxyOAuthService.prototype.listIdentityAwareProxyClients = function listIdentityAwareProxyClients(request, callback) { + return this.rpcCall(listIdentityAwareProxyClients, $root.google.cloud.iap.v1.ListIdentityAwareProxyClientsRequest, $root.google.cloud.iap.v1.ListIdentityAwareProxyClientsResponse, request, callback); + }, "name", { value: "ListIdentityAwareProxyClients" }); + + /** + * Calls ListIdentityAwareProxyClients. + * @function listIdentityAwareProxyClients + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest} request ListIdentityAwareProxyClientsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|getIdentityAwareProxyClient}. + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @typedef GetIdentityAwareProxyClientCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iap.v1.IdentityAwareProxyClient} [response] IdentityAwareProxyClient + */ + + /** + * Calls GetIdentityAwareProxyClient. + * @function getIdentityAwareProxyClient + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest} request GetIdentityAwareProxyClientRequest message or plain object + * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.GetIdentityAwareProxyClientCallback} callback Node-style callback called with the error, if any, and IdentityAwareProxyClient + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IdentityAwareProxyOAuthService.prototype.getIdentityAwareProxyClient = function getIdentityAwareProxyClient(request, callback) { + return this.rpcCall(getIdentityAwareProxyClient, $root.google.cloud.iap.v1.GetIdentityAwareProxyClientRequest, $root.google.cloud.iap.v1.IdentityAwareProxyClient, request, callback); + }, "name", { value: "GetIdentityAwareProxyClient" }); + + /** + * Calls GetIdentityAwareProxyClient. + * @function getIdentityAwareProxyClient + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest} request GetIdentityAwareProxyClientRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|resetIdentityAwareProxyClientSecret}. + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @typedef ResetIdentityAwareProxyClientSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iap.v1.IdentityAwareProxyClient} [response] IdentityAwareProxyClient + */ + + /** + * Calls ResetIdentityAwareProxyClientSecret. + * @function resetIdentityAwareProxyClientSecret + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest} request ResetIdentityAwareProxyClientSecretRequest message or plain object + * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.ResetIdentityAwareProxyClientSecretCallback} callback Node-style callback called with the error, if any, and IdentityAwareProxyClient + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IdentityAwareProxyOAuthService.prototype.resetIdentityAwareProxyClientSecret = function resetIdentityAwareProxyClientSecret(request, callback) { + return this.rpcCall(resetIdentityAwareProxyClientSecret, $root.google.cloud.iap.v1.ResetIdentityAwareProxyClientSecretRequest, $root.google.cloud.iap.v1.IdentityAwareProxyClient, request, callback); + }, "name", { value: "ResetIdentityAwareProxyClientSecret" }); + + /** + * Calls ResetIdentityAwareProxyClientSecret. + * @function resetIdentityAwareProxyClientSecret + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest} request ResetIdentityAwareProxyClientSecretRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|deleteIdentityAwareProxyClient}. + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @typedef DeleteIdentityAwareProxyClientCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteIdentityAwareProxyClient. + * @function deleteIdentityAwareProxyClient + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest} request DeleteIdentityAwareProxyClientRequest message or plain object + * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.DeleteIdentityAwareProxyClientCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IdentityAwareProxyOAuthService.prototype.deleteIdentityAwareProxyClient = function deleteIdentityAwareProxyClient(request, callback) { + return this.rpcCall(deleteIdentityAwareProxyClient, $root.google.cloud.iap.v1.DeleteIdentityAwareProxyClientRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteIdentityAwareProxyClient" }); + + /** + * Calls DeleteIdentityAwareProxyClient. + * @function deleteIdentityAwareProxyClient + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest} request DeleteIdentityAwareProxyClientRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return IdentityAwareProxyOAuthService; + })(); + v1.ListBrandsRequest = (function() { /** diff --git a/packages/google-cloud-iap/protos/protos.json b/packages/google-cloud-iap/protos/protos.json index ca7d193dfe9..1d0b8c520bd 100644 --- a/packages/google-cloud-iap/protos/protos.json +++ b/packages/google-cloud-iap/protos/protos.json @@ -327,132 +327,6 @@ } } }, - "IdentityAwareProxyOAuthService": { - "options": { - "(google.api.default_host)": "iap.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ListBrands": { - "requestType": "ListBrandsRequest", - "responseType": "ListBrandsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*}/brands" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*}/brands" - } - } - ] - }, - "CreateBrand": { - "requestType": "CreateBrandRequest", - "responseType": "Brand", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*}/brands", - "(google.api.http).body": "brand" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*}/brands", - "body": "brand" - } - } - ] - }, - "GetBrand": { - "requestType": "GetBrandRequest", - "responseType": "Brand", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/brands/*}" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/brands/*}" - } - } - ] - }, - "CreateIdentityAwareProxyClient": { - "requestType": "CreateIdentityAwareProxyClientRequest", - "responseType": "IdentityAwareProxyClient", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients", - "(google.api.http).body": "identity_aware_proxy_client" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients", - "body": "identity_aware_proxy_client" - } - } - ] - }, - "ListIdentityAwareProxyClients": { - "requestType": "ListIdentityAwareProxyClientsRequest", - "responseType": "ListIdentityAwareProxyClientsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients" - } - } - ] - }, - "GetIdentityAwareProxyClient": { - "requestType": "GetIdentityAwareProxyClientRequest", - "responseType": "IdentityAwareProxyClient", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" - } - } - ] - }, - "ResetIdentityAwareProxyClientSecret": { - "requestType": "ResetIdentityAwareProxyClientSecretRequest", - "responseType": "IdentityAwareProxyClient", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}:resetSecret", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}:resetSecret", - "body": "*" - } - } - ] - }, - "DeleteIdentityAwareProxyClient": { - "requestType": "DeleteIdentityAwareProxyClientRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" - } - } - ] - } - } - }, "GetIapSettingsRequest": { "fields": { "name": { @@ -515,6 +389,10 @@ "reauthSettings": { "type": "ReauthSettings", "id": 6 + }, + "allowedDomainsSettings": { + "type": "AllowedDomainsSettings", + "id": 7 } } }, @@ -564,6 +442,11 @@ }, "nested": { "Method": { + "valuesOptions": { + "PASSWORD": { + "deprecated": true + } + }, "values": { "METHOD_UNSPECIFIED": 0, "LOGIN": 1, @@ -580,6 +463,29 @@ } } }, + "AllowedDomainsSettings": { + "oneofs": { + "_enable": { + "oneof": [ + "enable" + ] + } + }, + "fields": { + "enable": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "domains": { + "rule": "repeated", + "type": "string", + "id": 2 + } + } + }, "ApplicationSettings": { "fields": { "csmSettings": { @@ -593,6 +499,10 @@ "cookieDomain": { "type": "google.protobuf.StringValue", "id": 3 + }, + "attributePropagationSettings": { + "type": "AttributePropagationSettings", + "id": 4 } } }, @@ -605,6 +515,13 @@ } }, "AccessDeniedPageSettings": { + "oneofs": { + "_remediationTokenGenerationEnabled": { + "oneof": [ + "remediationTokenGenerationEnabled" + ] + } + }, "fields": { "accessDeniedPageUri": { "type": "google.protobuf.StringValue", @@ -613,6 +530,184 @@ "generateTroubleshootingUri": { "type": "google.protobuf.BoolValue", "id": 2 + }, + "remediationTokenGenerationEnabled": { + "type": "google.protobuf.BoolValue", + "id": 3, + "options": { + "proto3_optional": true + } + } + } + }, + "AttributePropagationSettings": { + "oneofs": { + "_expression": { + "oneof": [ + "expression" + ] + }, + "_enable": { + "oneof": [ + "enable" + ] + } + }, + "fields": { + "expression": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "outputCredentials": { + "rule": "repeated", + "type": "OutputCredentials", + "id": 2 + }, + "enable": { + "type": "bool", + "id": 3, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "OutputCredentials": { + "values": { + "OUTPUT_CREDENTIALS_UNSPECIFIED": 0, + "HEADER": 1, + "JWT": 2, + "RCTOKEN": 3 + } + } + } + }, + "IdentityAwareProxyOAuthService": { + "options": { + "(google.api.default_host)": "iap.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListBrands": { + "requestType": "ListBrandsRequest", + "responseType": "ListBrandsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*}/brands" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*}/brands" + } + } + ] + }, + "CreateBrand": { + "requestType": "CreateBrandRequest", + "responseType": "Brand", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*}/brands", + "(google.api.http).body": "brand" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*}/brands", + "body": "brand" + } + } + ] + }, + "GetBrand": { + "requestType": "GetBrandRequest", + "responseType": "Brand", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/brands/*}" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/brands/*}" + } + } + ] + }, + "CreateIdentityAwareProxyClient": { + "requestType": "CreateIdentityAwareProxyClientRequest", + "responseType": "IdentityAwareProxyClient", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients", + "(google.api.http).body": "identity_aware_proxy_client" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients", + "body": "identity_aware_proxy_client" + } + } + ] + }, + "ListIdentityAwareProxyClients": { + "requestType": "ListIdentityAwareProxyClientsRequest", + "responseType": "ListIdentityAwareProxyClientsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients" + } + } + ] + }, + "GetIdentityAwareProxyClient": { + "requestType": "GetIdentityAwareProxyClientRequest", + "responseType": "IdentityAwareProxyClient", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" + } + } + ] + }, + "ResetIdentityAwareProxyClientSecret": { + "requestType": "ResetIdentityAwareProxyClientSecretRequest", + "responseType": "IdentityAwareProxyClient", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}:resetSecret", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}:resetSecret", + "body": "*" + } + } + ] + }, + "DeleteIdentityAwareProxyClient": { + "requestType": "DeleteIdentityAwareProxyClientRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" + } + } + ] } } }, diff --git a/packages/google-cloud-iap/samples/generated/v1/identity_aware_proxy_admin_service.create_tunnel_dest_group.js b/packages/google-cloud-iap/samples/generated/v1/identity_aware_proxy_admin_service.create_tunnel_dest_group.js index 8361feb87ac..65f5a9dbad4 100644 --- a/packages/google-cloud-iap/samples/generated/v1/identity_aware_proxy_admin_service.create_tunnel_dest_group.js +++ b/packages/google-cloud-iap/samples/generated/v1/identity_aware_proxy_admin_service.create_tunnel_dest_group.js @@ -39,10 +39,10 @@ function main(parent, tunnelDestGroup, tunnelDestGroupId) { */ // const tunnelDestGroup = {} /** - * Required. The ID to use for the TunnelDestGroup, which becomes the final component of - * the resource name. + * Required. The ID to use for the TunnelDestGroup, which becomes the final + * component of the resource name. * This value must be 4-63 characters, and valid characters - * are `[a-z][0-9]-`. + * are `[a-z]-`. */ // const tunnelDestGroupId = 'abc123' diff --git a/packages/google-cloud-iap/src/v1/identity_aware_proxy_admin_service_client.ts b/packages/google-cloud-iap/src/v1/identity_aware_proxy_admin_service_client.ts index d59036feabe..6e5ae2c4294 100644 --- a/packages/google-cloud-iap/src/v1/identity_aware_proxy_admin_service_client.ts +++ b/packages/google-cloud-iap/src/v1/identity_aware_proxy_admin_service_client.ts @@ -121,6 +121,9 @@ export class IdentityAwareProxyAdminServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; @@ -811,11 +814,11 @@ export class IdentityAwareProxyAdminServiceClient { * @param {google.cloud.iap.v1.TunnelDestGroup} request.tunnelDestGroup * Required. The TunnelDestGroup to create. * @param {string} request.tunnelDestGroupId - * Required. The ID to use for the TunnelDestGroup, which becomes the final component of - * the resource name. + * Required. The ID to use for the TunnelDestGroup, which becomes the final + * component of the resource name. * * This value must be 4-63 characters, and valid characters - * are `{@link 0-9|a-z}-`. + * are `[a-z]-`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. diff --git a/packages/google-cloud-iap/src/v1/identity_aware_proxy_o_auth_service_client.ts b/packages/google-cloud-iap/src/v1/identity_aware_proxy_o_auth_service_client.ts index 5f6991a83b8..a48d6292815 100644 --- a/packages/google-cloud-iap/src/v1/identity_aware_proxy_o_auth_service_client.ts +++ b/packages/google-cloud-iap/src/v1/identity_aware_proxy_o_auth_service_client.ts @@ -123,6 +123,9 @@ export class IdentityAwareProxyOAuthServiceClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/packages/google-cloud-iap/src/v1beta1/identity_aware_proxy_admin_v1_beta1_client.ts b/packages/google-cloud-iap/src/v1beta1/identity_aware_proxy_admin_v1_beta1_client.ts index 65cf72adc1d..c80b4710738 100644 --- a/packages/google-cloud-iap/src/v1beta1/identity_aware_proxy_admin_v1_beta1_client.ts +++ b/packages/google-cloud-iap/src/v1beta1/identity_aware_proxy_admin_v1_beta1_client.ts @@ -118,6 +118,9 @@ export class IdentityAwareProxyAdminV1Beta1Client { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes;