UNPKG

@ondewo/csi-client-nodejs

Version:

ONDEWO Communication System Integration (CSI) Client library for Nodejs

150 lines (135 loc) 6.29 kB
// GENERATED CODE -- DO NOT EDIT! // Original file comments: // Copyright 2016 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // 'use strict'; var grpc = require('@grpc/grpc-js'); var google_iam_v1_iam_policy_pb = require('../../../google/iam/v1/iam_policy_pb.js'); var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); var google_iam_v1_policy_pb = require('../../../google/iam/v1/policy_pb.js'); function serialize_google_iam_v1_GetIamPolicyRequest(arg) { if (!(arg instanceof google_iam_v1_iam_policy_pb.GetIamPolicyRequest)) { throw new Error('Expected argument of type google.iam.v1.GetIamPolicyRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_google_iam_v1_GetIamPolicyRequest(buffer_arg) { return google_iam_v1_iam_policy_pb.GetIamPolicyRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_google_iam_v1_Policy(arg) { if (!(arg instanceof google_iam_v1_policy_pb.Policy)) { throw new Error('Expected argument of type google.iam.v1.Policy'); } return Buffer.from(arg.serializeBinary()); } function deserialize_google_iam_v1_Policy(buffer_arg) { return google_iam_v1_policy_pb.Policy.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_google_iam_v1_SetIamPolicyRequest(arg) { if (!(arg instanceof google_iam_v1_iam_policy_pb.SetIamPolicyRequest)) { throw new Error('Expected argument of type google.iam.v1.SetIamPolicyRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_google_iam_v1_SetIamPolicyRequest(buffer_arg) { return google_iam_v1_iam_policy_pb.SetIamPolicyRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_google_iam_v1_TestIamPermissionsRequest(arg) { if (!(arg instanceof google_iam_v1_iam_policy_pb.TestIamPermissionsRequest)) { throw new Error('Expected argument of type google.iam.v1.TestIamPermissionsRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_google_iam_v1_TestIamPermissionsRequest(buffer_arg) { return google_iam_v1_iam_policy_pb.TestIamPermissionsRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_google_iam_v1_TestIamPermissionsResponse(arg) { if (!(arg instanceof google_iam_v1_iam_policy_pb.TestIamPermissionsResponse)) { throw new Error('Expected argument of type google.iam.v1.TestIamPermissionsResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_google_iam_v1_TestIamPermissionsResponse(buffer_arg) { return google_iam_v1_iam_policy_pb.TestIamPermissionsResponse.deserializeBinary(new Uint8Array(buffer_arg)); } // ## API Overview // // Manages Identity and Access Management (IAM) policies. // // Any implementation of an API that offers access control features // implements the google.iam.v1.IAMPolicy interface. // // ## Data model // // Access control is applied when a principal (user or service account), takes // some action on a resource exposed by a service. Resources, identified by // URI-like names, are the unit of access control specification. Service // implementations can choose the granularity of access control and the // supported permissions for their resources. // For example one database service may allow access control to be // specified only at the Table level, whereas another might allow access control // to also be specified at the Column level. // // ## Policy Structure // // See google.iam.v1.Policy // // This is intentionally not a CRUD style API because access control policies // are created and deleted implicitly with the resources to which they are // attached. var IAMPolicyService = exports.IAMPolicyService = { // Sets the access control policy on the specified resource. Replaces any // existing policy. setIamPolicy: { path: '/google.iam.v1.IAMPolicy/SetIamPolicy', requestStream: false, responseStream: false, requestType: google_iam_v1_iam_policy_pb.SetIamPolicyRequest, responseType: google_iam_v1_policy_pb.Policy, requestSerialize: serialize_google_iam_v1_SetIamPolicyRequest, requestDeserialize: deserialize_google_iam_v1_SetIamPolicyRequest, responseSerialize: serialize_google_iam_v1_Policy, responseDeserialize: deserialize_google_iam_v1_Policy, }, // Gets the access control policy for a resource. // Returns an empty policy if the resource exists and does not have a policy // set. getIamPolicy: { path: '/google.iam.v1.IAMPolicy/GetIamPolicy', requestStream: false, responseStream: false, requestType: google_iam_v1_iam_policy_pb.GetIamPolicyRequest, responseType: google_iam_v1_policy_pb.Policy, requestSerialize: serialize_google_iam_v1_GetIamPolicyRequest, requestDeserialize: deserialize_google_iam_v1_GetIamPolicyRequest, responseSerialize: serialize_google_iam_v1_Policy, responseDeserialize: deserialize_google_iam_v1_Policy, }, // Returns permissions that a caller has on the specified resource. // If the resource does not exist, this will return an empty set of // permissions, not a NOT_FOUND error. testIamPermissions: { path: '/google.iam.v1.IAMPolicy/TestIamPermissions', requestStream: false, responseStream: false, requestType: google_iam_v1_iam_policy_pb.TestIamPermissionsRequest, responseType: google_iam_v1_iam_policy_pb.TestIamPermissionsResponse, requestSerialize: serialize_google_iam_v1_TestIamPermissionsRequest, requestDeserialize: deserialize_google_iam_v1_TestIamPermissionsRequest, responseSerialize: serialize_google_iam_v1_TestIamPermissionsResponse, responseDeserialize: deserialize_google_iam_v1_TestIamPermissionsResponse, }, }; exports.IAMPolicyClient = grpc.makeGenericClientConstructor(IAMPolicyService);