| 1 | package Google::Cloud::Sql::V1::CloudSqlIamPolicies; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | our $VERSION = '0.14'; | ||
| 7 | |||
| 8 | use Protobuf::Message; | ||
| 9 | use Protobuf::DescriptorPool; | ||
| 10 | use Protobuf::Internal qw(:all); | ||
| 11 | use MIME::Base64; | ||
| 12 | |||
| 13 | BEGIN { | ||
| 14 | eval { require Google::Api::Annotations }; | ||
| 15 | eval { require Google::Api::Client }; | ||
| 16 | my $descriptor_b64 = <<'EOF'; | ||
| 17 | CjBnb29nbGUvY2xvdWQvc3FsL3YxL2Nsb3VkX3NxbF9pYW1fcG9saWNpZXMucHJvdG8SE2dv | ||
| 18 | b2dsZS5jbG91ZC5zcWwudjEaHGdvb2dsZS9hcGkvYW5ub3RhdGlvbnMucHJvdG8aF2dvb2ds | ||
| 19 | ZS9hcGkvY2xpZW50LnByb3RvMjMKFVNxbElhbVBvbGljaWVzU2VydmljZRoaykEXc3FsYWRt | ||
| 20 | aW4uZ29vZ2xlYXBpcy5jb21CYAoXY29tLmdvb2dsZS5jbG91ZC5zcWwudjFCGENsb3VkU3Fs | ||
| 21 | SWFtUG9saWNpZXNQcm90b1ABWiljbG91ZC5nb29nbGUuY29tL2dvL3NxbC9hcGl2MS9zcWxw | ||
| 22 | YjtzcWxwYkqjBgoGEgQOAB0BCrwECgEMEgMOABIysQQgQ29weXJpZ2h0IDIwMjYgR29vZ2xl | ||
| 23 | IExMQwoKIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAg | ||
| 24 | KHRoZSAiTGljZW5zZSIpOwogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4g | ||
| 25 | Y29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLgogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9m | ||
| 26 | IHRoZSBMaWNlbnNlIGF0CgogICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9M | ||
| 27 | SUNFTlNFLTIuMAoKIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3Jl | ||
| 28 | ZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUKIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNl | ||
| 29 | bnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsCiBXSVRIT1VUIFdBUlJB | ||
| 30 | TlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1w | ||
| 31 | bGllZC4KIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVy | ||
| 32 | bmluZyBwZXJtaXNzaW9ucyBhbmQKIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLgoK | ||
| 33 | CAoBAhIDEAAcCgkKAgMAEgMSACYKCQoCAwESAxMAIQoICgEIEgMVAEAKCQoCCAsSAxUAQAoI | ||
| 34 | CgEIEgMWACIKCQoCCAoSAxYAIgoICgEIEgMXADkKCQoCCAgSAxcAOQoICgEIEgMYADAKCQoC | ||
| 35 | CAESAxgAMApACgIGABIEGwAdARo0IFNlcnZpY2UgZm9yIHByb3ZpZGluZyBJQU0gTWV0YSBB | ||
| 36 | UElzIGZvciBDbG91ZCBTUUwuCgoKCgMGAAESAxsIHQoKCgMGAAMSAxwCPwoMCgUGAAOZCBID | ||
| 37 | HAI/YgZwcm90bzM= | ||
| 38 | EOF | ||
| 39 | Protobuf::DescriptorPool->generated_pool->add_serialized_file(MIME::Base64::decode_base64($descriptor_b64)); | ||
| 40 | } | ||
| 41 | |||
| 42 | # Message definitions | ||
| 43 | |||
| 44 | # === Service Client: Google::Cloud::Sql::V1::CloudSqlIamPolicies::SqlIamPoliciesServiceClient === | ||
| 45 | package Google::Cloud::Sql::V1::CloudSqlIamPolicies::SqlIamPoliciesServiceClient; | ||
| 46 | |||
| 47 | =pod | ||
| 48 | |||
| 49 | =head2 Service Client: Google::Cloud::Sql::V1::CloudSqlIamPolicies::SqlIamPoliciesServiceClient | ||
| 50 | |||
| 51 | Client stub representing the remote C<SqlIamPoliciesService> gRPC service. Delegates call dispatching to L<Google::gRPC::Client>. | ||
| 52 | |||
| 53 | =head3 target | ||
| 54 | |||
| 55 | The endpoint target address. Defaults to C<sql.googleapis.com:443>. | ||
| 56 | |||
| 57 | =head3 credentials | ||
| 58 | |||
| 59 | The authentication credentials provider. Defaults to application default credentials via L<Google::Auth>. | ||
| 60 | |||
| 61 | =cut | ||
| 62 | |||
| 63 | use Moo; | ||
| 64 | use Google::Auth; | ||
| 65 | use Google::gRPC::Client; | ||
| 66 | |||
| 67 | has credentials => ( is => 'ro', default => sub { Google::Auth->default() } ); | ||
| 68 | has target => ( is => 'ro', default => 'sql.googleapis.com:443' ); | ||
| 69 | |||
| 70 | has _grpc_client => ( | ||
| 71 | is => 'ro', | ||
| 72 | lazy => 1, | ||
| 73 | builder => sub { | ||
| 74 | my $self = shift; | ||
| 75 | return Google::gRPC::Client->new( | ||
| 76 | target => $self->target, | ||
| 77 | auth_token => $self->credentials->get_token(), | ||
| 78 | ); | ||
| 79 | } | ||
| 80 | ); | ||
| 81 | |||
| 82 | 1; | ||
| 83 | |||
| 84 | __END__ |