responseObserver) {
+ Object response = responses.poll();
+ if (response instanceof Location) {
+ requests.add(request);
+ responseObserver.onNext(((Location) response));
+ responseObserver.onCompleted();
+ } else if (response instanceof Exception) {
+ responseObserver.onError(((Exception) response));
+ } else {
+ responseObserver.onError(
+ new IllegalArgumentException(
+ String.format(
+ "Unrecognized response type %s for method GetLocation, expected %s or %s",
+ response == null ? "null" : response.getClass().getName(),
+ Location.class.getName(),
+ Exception.class.getName())));
+ }
+ }
+}
diff --git a/java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerProto.java b/java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerProto.java
index 6282899ca3cf..4828dead84fb 100644
--- a/java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerProto.java
+++ b/java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerProto.java
@@ -355,7 +355,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "CACHE\020\001:v\352As\n-certificatemanager.googlea"
+ "pis.com/Certificate\022Bprojects/{project}/"
+ "locations/{location}/certificates/{certi"
- + "ficate}B\006\n\004type\"\275\006\n\016CertificateMap\022\014\n\004na"
+ + "ficate}B\006\n\004type\"\337\005\n\016CertificateMap\022\014\n\004na"
+ "me\030\001 \001(\t\022\023\n\013description\030\005 \001(\t\0224\n\013create_"
+ "time\030\002 \001(\0132\032.google.protobuf.TimestampB\003"
+ "\340A\003\0224\n\013update_time\030\006 \001(\0132\032.google.protob"
@@ -363,201 +363,192 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "le.cloud.certificatemanager.v1.Certifica"
+ "teMap.LabelsEntry\022X\n\014gclb_targets\030\004 \003(\0132"
+ "=.google.cloud.certificatemanager.v1.Cer"
- + "tificateMap.GclbTargetB\003\340A\003\032\277\002\n\nGclbTarg"
- + "et\022L\n\022target_https_proxy\030\001 \001(\tB.\372A+\n)com"
- + "pute.googleapis.com/TargetHttpsProxiesH\000"
- + "\022H\n\020target_ssl_proxy\030\003 \001(\tB,\372A)\n\'compute"
- + ".googleapis.com/TargetSslProxiesH\000\022Z\n\nip"
- + "_configs\030\002 \003(\0132F.google.cloud.certificat"
- + "emanager.v1.CertificateMap.GclbTarget.Ip"
- + "Config\032-\n\010IpConfig\022\022\n\nip_address\030\001 \001(\t\022\r"
- + "\n\005ports\030\003 \003(\rB\016\n\014target_proxy\032-\n\013LabelsE"
- + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\200\001\352"
- + "A}\n0certificatemanager.googleapis.com/Ce"
- + "rtificateMap\022Iprojects/{project}/locatio"
- + "ns/{location}/certificateMaps/{certifica"
- + "te_map}\"\221\006\n\023CertificateMapEntry\022\014\n\004name\030"
- + "\001 \001(\t\022\023\n\013description\030\t \001(\t\0224\n\013create_tim"
- + "e\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003"
- + "\0224\n\013update_time\030\003 \001(\0132\032.google.protobuf."
- + "TimestampB\003\340A\003\022S\n\006labels\030\004 \003(\0132C.google."
- + "cloud.certificatemanager.v1.CertificateM"
- + "apEntry.LabelsEntry\022\022\n\010hostname\030\005 \001(\tH\000\022"
- + "R\n\007matcher\030\n \001(\0162?.google.cloud.certific"
- + "atemanager.v1.CertificateMapEntry.Matche"
- + "rH\000\022H\n\014certificates\030\007 \003(\tB2\372A/\n-certific"
- + "atemanager.googleapis.com/Certificate\022D\n"
- + "\005state\030\010 \001(\01620.google.cloud.certificatem"
- + "anager.v1.ServingStateB\003\340A\003\032-\n\013LabelsEnt"
- + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"/\n\007Ma"
- + "tcher\022\027\n\023MATCHER_UNSPECIFIED\020\000\022\013\n\007PRIMAR"
- + "Y\020\001:\264\001\352A\260\001\n5certificatemanager.googleapi"
- + "s.com/CertificateMapEntry\022wprojects/{pro"
- + "ject}/locations/{location}/certificateMa"
- + "ps/{certificate_map}/certificateMapEntri"
- + "es/{certificate_map_entry}B\007\n\005match\"\374\004\n\020"
- + "DnsAuthorization\022\014\n\004name\030\001 \001(\t\0224\n\013create"
- + "_time\030\002 \001(\0132\032.google.protobuf.TimestampB"
- + "\003\340A\003\0224\n\013update_time\030\003 \001(\0132\032.google.proto"
- + "buf.TimestampB\003\340A\003\022P\n\006labels\030\004 \003(\0132@.goo"
- + "gle.cloud.certificatemanager.v1.DnsAutho"
- + "rization.LabelsEntry\022\023\n\013description\030\005 \001("
- + "\t\022\026\n\006domain\030\006 \001(\tB\006\340A\002\340A\005\022h\n\023dns_resourc"
- + "e_record\030\n \001(\0132F.google.cloud.certificat"
- + "emanager.v1.DnsAuthorization.DnsResource"
- + "RecordB\003\340A\003\032L\n\021DnsResourceRecord\022\021\n\004name"
- + "\030\001 \001(\tB\003\340A\003\022\021\n\004type\030\002 \001(\tB\003\340A\003\022\021\n\004data\030\003"
- + " \001(\tB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n"
- + "\005value\030\002 \001(\t:\0028\001:\207\001\352A\203\001\n2certificatemana"
- + "ger.googleapis.com/DnsAuthorization\022Mpro"
- + "jects/{project}/locations/{location}/dns"
- + "Authorizations/{dns_authorization}*F\n\014Se"
- + "rvingState\022\035\n\031SERVING_STATE_UNSPECIFIED\020"
- + "\000\022\n\n\006ACTIVE\020\001\022\013\n\007PENDING\020\0022\336(\n\022Certifica"
- + "teManager\022\320\001\n\020ListCertificates\022;.google."
- + "cloud.certificatemanager.v1.ListCertific"
- + "atesRequest\032<.google.cloud.certificatema"
- + "nager.v1.ListCertificatesResponse\"A\202\323\344\223\002"
- + "2\0220/v1/{parent=projects/*/locations/*}/c"
- + "ertificates\332A\006parent\022\275\001\n\016GetCertificate\022"
- + "9.google.cloud.certificatemanager.v1.Get"
- + "CertificateRequest\032/.google.cloud.certif"
- + "icatemanager.v1.Certificate\"?\202\323\344\223\0022\0220/v1"
- + "/{name=projects/*/locations/*/certificat"
- + "es/*}\332A\004name\022\377\001\n\021CreateCertificate\022<.goo"
- + "gle.cloud.certificatemanager.v1.CreateCe"
- + "rtificateRequest\032\035.google.longrunning.Op"
- + "eration\"\214\001\202\323\344\223\002?\"0/v1/{parent=projects/*"
- + "/locations/*}/certificates:\013certificate\332"
- + "A!parent,certificate,certificate_id\312A \n\013"
- + "Certificate\022\021OperationMetadata\022\201\002\n\021Updat"
- + "eCertificate\022<.google.cloud.certificatem"
- + "anager.v1.UpdateCertificateRequest\032\035.goo"
- + "gle.longrunning.Operation\"\216\001\202\323\344\223\002K2.google.cloud.certi"
- + "ficatemanager.v1.ListCertificateMapsRequ"
- + "est\032?.google.cloud.certificatemanager.v1"
- + ".ListCertificateMapsResponse\"D\202\323\344\223\0025\0223/v"
- + "1/{parent=projects/*/locations/*}/certif"
- + "icateMaps\332A\006parent\022\311\001\n\021GetCertificateMap"
- + "\022<.google.cloud.certificatemanager.v1.Ge"
- + "tCertificateMapRequest\0322.google.cloud.ce"
- + "rtificatemanager.v1.CertificateMap\"B\202\323\344\223"
- + "\0025\0223/v1/{name=projects/*/locations/*/cer"
- + "tificateMaps/*}\332A\004name\022\227\002\n\024CreateCertifi"
- + "cateMap\022?.google.cloud.certificatemanage"
- + "r.v1.CreateCertificateMapRequest\032\035.googl"
- + "e.longrunning.Operation\"\236\001\202\323\344\223\002F\"3/v1/{p"
- + "arent=projects/*/locations/*}/certificat"
- + "eMaps:\017certificate_map\332A)parent,certific"
- + "ate_map,certificate_map_id\312A#\n\016Certifica"
- + "teMap\022\021OperationMetadata\022\231\002\n\024UpdateCerti"
- + "ficateMap\022?.google.cloud.certificatemana"
- + "ger.v1.UpdateCertificateMapRequest\032\035.goo"
- + "gle.longrunning.Operation\"\240\001\202\323\344\223\002V2C/v1/"
- + "{certificate_map.name=projects/*/locatio"
- + "ns/*/certificateMaps/*}:\017certificate_map"
- + "\332A\033certificate_map,update_mask\312A#\n\016Certi"
- + "ficateMap\022\021OperationMetadata\022\347\001\n\024DeleteC"
- + "ertificateMap\022?.google.cloud.certificate"
- + "manager.v1.DeleteCertificateMapRequest\032\035"
- + ".google.longrunning.Operation\"o\202\323\344\223\0025*3/"
- + "v1/{name=projects/*/locations/*/certific"
- + "ateMaps/*}\332A\004name\312A*\n\025google.protobuf.Em"
- + "pty\022\021OperationMetadata\022\206\002\n\031ListCertifica"
- + "teMapEntries\022D.google.cloud.certificatem"
- + "anager.v1.ListCertificateMapEntriesReque"
- + "st\032E.google.cloud.certificatemanager.v1."
- + "ListCertificateMapEntriesResponse\"\\\202\323\344\223\002"
- + "M\022K/v1/{parent=projects/*/locations/*/ce"
- + "rtificateMaps/*}/certificateMapEntries\332A"
- + "\006parent\022\360\001\n\026GetCertificateMapEntry\022A.goo"
- + "gle.cloud.certificatemanager.v1.GetCerti"
- + "ficateMapEntryRequest\0327.google.cloud.cer"
- + "tificatemanager.v1.CertificateMapEntry\"Z"
- + "\202\323\344\223\002M\022K/v1/{name=projects/*/locations/*"
- + "/certificateMaps/*/certificateMapEntries"
- + "/*}\332A\004name\022\320\002\n\031CreateCertificateMapEntry"
- + "\022D.google.cloud.certificatemanager.v1.Cr"
- + "eateCertificateMapEntryRequest\032\035.google."
- + "longrunning.Operation\"\315\001\202\323\344\223\002d\"K/v1/{par"
- + "ent=projects/*/locations/*/certificateMa"
- + "ps/*}/certificateMapEntries:\025certificate"
- + "_map_entry\332A5parent,certificate_map_entr"
- + "y,certificate_map_entry_id\312A(\n\023Certifica"
- + "teMapEntry\022\021OperationMetadata\022\322\002\n\031Update"
- + "CertificateMapEntry\022D.google.cloud.certi"
- + "ficatemanager.v1.UpdateCertificateMapEnt"
- + "ryRequest\032\035.google.longrunning.Operation"
- + "\"\317\001\202\323\344\223\002z2a/v1/{certificate_map_entry.na"
- + "me=projects/*/locations/*/certificateMap"
- + "s/*/certificateMapEntries/*}:\025certificat"
- + "e_map_entry\332A!certificate_map_entry,upda"
- + "te_mask\312A(\n\023CertificateMapEntry\022\021Operati"
- + "onMetadata\022\212\002\n\031DeleteCertificateMapEntry"
- + "\022D.google.cloud.certificatemanager.v1.De"
- + "leteCertificateMapEntryRequest\032\035.google."
- + "longrunning.Operation\"\207\001\202\323\344\223\002M*K/v1/{nam"
- + "e=projects/*/locations/*/certificateMaps"
- + "/*/certificateMapEntries/*}\332A\004name\312A*\n\025g"
- + "oogle.protobuf.Empty\022\021OperationMetadata\022"
- + "\344\001\n\025ListDnsAuthorizations\022@.google.cloud"
- + ".certificatemanager.v1.ListDnsAuthorizat"
- + "ionsRequest\032A.google.cloud.certificatema"
- + "nager.v1.ListDnsAuthorizationsResponse\"F"
- + "\202\323\344\223\0027\0225/v1/{parent=projects/*/locations"
- + "/*}/dnsAuthorizations\332A\006parent\022\321\001\n\023GetDn"
- + "sAuthorization\022>.google.cloud.certificat"
- + "emanager.v1.GetDnsAuthorizationRequest\0324"
- + ".google.cloud.certificatemanager.v1.DnsA"
- + "uthorization\"D\202\323\344\223\0027\0225/v1/{name=projects"
- + "/*/locations/*/dnsAuthorizations/*}\332A\004na"
- + "me\022\245\002\n\026CreateDnsAuthorization\022A.google.c"
- + "loud.certificatemanager.v1.CreateDnsAuth"
- + "orizationRequest\032\035.google.longrunning.Op"
- + "eration\"\250\001\202\323\344\223\002J\"5/v1/{parent=projects/*"
- + "/locations/*}/dnsAuthorizations:\021dns_aut"
- + "horization\332A-parent,dns_authorization,dn"
- + "s_authorization_id\312A%\n\020DnsAuthorization\022"
- + "\021OperationMetadata\022\247\002\n\026UpdateDnsAuthoriz"
- + "ation\022A.google.cloud.certificatemanager."
- + "v1.UpdateDnsAuthorizationRequest\032\035.googl"
- + "e.longrunning.Operation\"\252\001\202\323\344\223\002\\2G/v1/{d"
- + "ns_authorization.name=projects/*/locatio"
- + "ns/*/dnsAuthorizations/*}:\021dns_authoriza"
- + "tion\332A\035dns_authorization,update_mask\312A%\n"
- + "\020DnsAuthorization\022\021OperationMetadata\022\355\001\n"
- + "\026DeleteDnsAuthorization\022A.google.cloud.c"
- + "ertificatemanager.v1.DeleteDnsAuthorizat"
- + "ionRequest\032\035.google.longrunning.Operatio"
- + "n\"q\202\323\344\223\0027*5/v1/{name=projects/*/location"
- + "s/*/dnsAuthorizations/*}\332A\004name\312A*\n\025goog"
- + "le.protobuf.Empty\022\021OperationMetadata\032U\312A"
- + "!certificatemanager.googleapis.com\322A.htt"
- + "ps://www.googleapis.com/auth/cloud-platf"
- + "ormB\203\004\n&com.google.cloud.certificatemana"
- + "ger.v1B\027CertificateManagerProtoP\001ZTgoogl"
- + "e.golang.org/genproto/googleapis/cloud/c"
- + "ertificatemanager/v1;certificatemanager\252"
- + "\002\"Google.Cloud.CertificateManager.V1\312\002\"G"
- + "oogle\\Cloud\\CertificateManager\\V1\352\002%Goog"
- + "le::Cloud::CertificateManager::V1\352A|\n)co"
- + "mpute.googleapis.com/TargetHttpsProxies\022"
- + "Oprojects/{project}/locations/{location}"
- + "/targetHttpsProxies/{target_https_proxy}"
- + "\352Av\n\'compute.googleapis.com/TargetSslPro"
- + "xies\022Kprojects/{project}/locations/{loca"
- + "tion}/targetSslProxies/{target_ssl_proxy"
- + "}b\006proto3"
+ + "tificateMap.GclbTargetB\003\340A\003\032\341\001\n\nGclbTarg"
+ + "et\022\034\n\022target_https_proxy\030\001 \001(\tH\000\022\032\n\020targ"
+ + "et_ssl_proxy\030\003 \001(\tH\000\022Z\n\nip_configs\030\002 \003(\013"
+ + "2F.google.cloud.certificatemanager.v1.Ce"
+ + "rtificateMap.GclbTarget.IpConfig\032-\n\010IpCo"
+ + "nfig\022\022\n\nip_address\030\001 \001(\t\022\r\n\005ports\030\003 \003(\rB"
+ + "\016\n\014target_proxy\032-\n\013LabelsEntry\022\013\n\003key\030\001 "
+ + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\200\001\352A}\n0certificat"
+ + "emanager.googleapis.com/CertificateMap\022I"
+ + "projects/{project}/locations/{location}/"
+ + "certificateMaps/{certificate_map}\"\221\006\n\023Ce"
+ + "rtificateMapEntry\022\014\n\004name\030\001 \001(\t\022\023\n\013descr"
+ + "iption\030\t \001(\t\0224\n\013create_time\030\002 \001(\0132\032.goog"
+ + "le.protobuf.TimestampB\003\340A\003\0224\n\013update_tim"
+ + "e\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003"
+ + "\022S\n\006labels\030\004 \003(\0132C.google.cloud.certific"
+ + "atemanager.v1.CertificateMapEntry.Labels"
+ + "Entry\022\022\n\010hostname\030\005 \001(\tH\000\022R\n\007matcher\030\n \001"
+ + "(\0162?.google.cloud.certificatemanager.v1."
+ + "CertificateMapEntry.MatcherH\000\022H\n\014certifi"
+ + "cates\030\007 \003(\tB2\372A/\n-certificatemanager.goo"
+ + "gleapis.com/Certificate\022D\n\005state\030\010 \001(\01620"
+ + ".google.cloud.certificatemanager.v1.Serv"
+ + "ingStateB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001("
+ + "\t\022\r\n\005value\030\002 \001(\t:\0028\001\"/\n\007Matcher\022\027\n\023MATCH"
+ + "ER_UNSPECIFIED\020\000\022\013\n\007PRIMARY\020\001:\264\001\352A\260\001\n5ce"
+ + "rtificatemanager.googleapis.com/Certific"
+ + "ateMapEntry\022wprojects/{project}/location"
+ + "s/{location}/certificateMaps/{certificat"
+ + "e_map}/certificateMapEntries/{certificat"
+ + "e_map_entry}B\007\n\005match\"\374\004\n\020DnsAuthorizati"
+ + "on\022\014\n\004name\030\001 \001(\t\0224\n\013create_time\030\002 \001(\0132\032."
+ + "google.protobuf.TimestampB\003\340A\003\0224\n\013update"
+ + "_time\030\003 \001(\0132\032.google.protobuf.TimestampB"
+ + "\003\340A\003\022P\n\006labels\030\004 \003(\0132@.google.cloud.cert"
+ + "ificatemanager.v1.DnsAuthorization.Label"
+ + "sEntry\022\023\n\013description\030\005 \001(\t\022\026\n\006domain\030\006 "
+ + "\001(\tB\006\340A\002\340A\005\022h\n\023dns_resource_record\030\n \001(\013"
+ + "2F.google.cloud.certificatemanager.v1.Dn"
+ + "sAuthorization.DnsResourceRecordB\003\340A\003\032L\n"
+ + "\021DnsResourceRecord\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\021\n"
+ + "\004type\030\002 \001(\tB\003\340A\003\022\021\n\004data\030\003 \001(\tB\003\340A\003\032-\n\013L"
+ + "abelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002"
+ + "8\001:\207\001\352A\203\001\n2certificatemanager.googleapis"
+ + ".com/DnsAuthorization\022Mprojects/{project"
+ + "}/locations/{location}/dnsAuthorizations"
+ + "/{dns_authorization}*F\n\014ServingState\022\035\n\031"
+ + "SERVING_STATE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022"
+ + "\013\n\007PENDING\020\0022\336(\n\022CertificateManager\022\320\001\n\020"
+ + "ListCertificates\022;.google.cloud.certific"
+ + "atemanager.v1.ListCertificatesRequest\032<."
+ + "google.cloud.certificatemanager.v1.ListC"
+ + "ertificatesResponse\"A\202\323\344\223\0022\0220/v1/{parent"
+ + "=projects/*/locations/*}/certificates\332A\006"
+ + "parent\022\275\001\n\016GetCertificate\0229.google.cloud"
+ + ".certificatemanager.v1.GetCertificateReq"
+ + "uest\032/.google.cloud.certificatemanager.v"
+ + "1.Certificate\"?\202\323\344\223\0022\0220/v1/{name=project"
+ + "s/*/locations/*/certificates/*}\332A\004name\022\377"
+ + "\001\n\021CreateCertificate\022<.google.cloud.cert"
+ + "ificatemanager.v1.CreateCertificateReque"
+ + "st\032\035.google.longrunning.Operation\"\214\001\202\323\344\223"
+ + "\002?\"0/v1/{parent=projects/*/locations/*}/"
+ + "certificates:\013certificate\332A!parent,certi"
+ + "ficate,certificate_id\312A \n\013Certificate\022\021O"
+ + "perationMetadata\022\201\002\n\021UpdateCertificate\022<"
+ + ".google.cloud.certificatemanager.v1.Upda"
+ + "teCertificateRequest\032\035.google.longrunnin"
+ + "g.Operation\"\216\001\202\323\344\223\002K2.google.cloud.certificatemanager."
+ + "v1.ListCertificateMapsRequest\032?.google.c"
+ + "loud.certificatemanager.v1.ListCertifica"
+ + "teMapsResponse\"D\202\323\344\223\0025\0223/v1/{parent=proj"
+ + "ects/*/locations/*}/certificateMaps\332A\006pa"
+ + "rent\022\311\001\n\021GetCertificateMap\022<.google.clou"
+ + "d.certificatemanager.v1.GetCertificateMa"
+ + "pRequest\0322.google.cloud.certificatemanag"
+ + "er.v1.CertificateMap\"B\202\323\344\223\0025\0223/v1/{name="
+ + "projects/*/locations/*/certificateMaps/*"
+ + "}\332A\004name\022\227\002\n\024CreateCertificateMap\022?.goog"
+ + "le.cloud.certificatemanager.v1.CreateCer"
+ + "tificateMapRequest\032\035.google.longrunning."
+ + "Operation\"\236\001\202\323\344\223\002F\"3/v1/{parent=projects"
+ + "/*/locations/*}/certificateMaps:\017certifi"
+ + "cate_map\332A)parent,certificate_map,certif"
+ + "icate_map_id\312A#\n\016CertificateMap\022\021Operati"
+ + "onMetadata\022\231\002\n\024UpdateCertificateMap\022?.go"
+ + "ogle.cloud.certificatemanager.v1.UpdateC"
+ + "ertificateMapRequest\032\035.google.longrunnin"
+ + "g.Operation\"\240\001\202\323\344\223\002V2C/v1/{certificate_m"
+ + "ap.name=projects/*/locations/*/certifica"
+ + "teMaps/*}:\017certificate_map\332A\033certificate"
+ + "_map,update_mask\312A#\n\016CertificateMap\022\021Ope"
+ + "rationMetadata\022\347\001\n\024DeleteCertificateMap\022"
+ + "?.google.cloud.certificatemanager.v1.Del"
+ + "eteCertificateMapRequest\032\035.google.longru"
+ + "nning.Operation\"o\202\323\344\223\0025*3/v1/{name=proje"
+ + "cts/*/locations/*/certificateMaps/*}\332A\004n"
+ + "ame\312A*\n\025google.protobuf.Empty\022\021Operation"
+ + "Metadata\022\206\002\n\031ListCertificateMapEntries\022D"
+ + ".google.cloud.certificatemanager.v1.List"
+ + "CertificateMapEntriesRequest\032E.google.cl"
+ + "oud.certificatemanager.v1.ListCertificat"
+ + "eMapEntriesResponse\"\\\202\323\344\223\002M\022K/v1/{parent"
+ + "=projects/*/locations/*/certificateMaps/"
+ + "*}/certificateMapEntries\332A\006parent\022\360\001\n\026Ge"
+ + "tCertificateMapEntry\022A.google.cloud.cert"
+ + "ificatemanager.v1.GetCertificateMapEntry"
+ + "Request\0327.google.cloud.certificatemanage"
+ + "r.v1.CertificateMapEntry\"Z\202\323\344\223\002M\022K/v1/{n"
+ + "ame=projects/*/locations/*/certificateMa"
+ + "ps/*/certificateMapEntries/*}\332A\004name\022\320\002\n"
+ + "\031CreateCertificateMapEntry\022D.google.clou"
+ + "d.certificatemanager.v1.CreateCertificat"
+ + "eMapEntryRequest\032\035.google.longrunning.Op"
+ + "eration\"\315\001\202\323\344\223\002d\"K/v1/{parent=projects/*"
+ + "/locations/*/certificateMaps/*}/certific"
+ + "ateMapEntries:\025certificate_map_entry\332A5p"
+ + "arent,certificate_map_entry,certificate_"
+ + "map_entry_id\312A(\n\023CertificateMapEntry\022\021Op"
+ + "erationMetadata\022\322\002\n\031UpdateCertificateMap"
+ + "Entry\022D.google.cloud.certificatemanager."
+ + "v1.UpdateCertificateMapEntryRequest\032\035.go"
+ + "ogle.longrunning.Operation\"\317\001\202\323\344\223\002z2a/v1"
+ + "/{certificate_map_entry.name=projects/*/"
+ + "locations/*/certificateMaps/*/certificat"
+ + "eMapEntries/*}:\025certificate_map_entry\332A!"
+ + "certificate_map_entry,update_mask\312A(\n\023Ce"
+ + "rtificateMapEntry\022\021OperationMetadata\022\212\002\n"
+ + "\031DeleteCertificateMapEntry\022D.google.clou"
+ + "d.certificatemanager.v1.DeleteCertificat"
+ + "eMapEntryRequest\032\035.google.longrunning.Op"
+ + "eration\"\207\001\202\323\344\223\002M*K/v1/{name=projects/*/l"
+ + "ocations/*/certificateMaps/*/certificate"
+ + "MapEntries/*}\332A\004name\312A*\n\025google.protobuf"
+ + ".Empty\022\021OperationMetadata\022\344\001\n\025ListDnsAut"
+ + "horizations\022@.google.cloud.certificatema"
+ + "nager.v1.ListDnsAuthorizationsRequest\032A."
+ + "google.cloud.certificatemanager.v1.ListD"
+ + "nsAuthorizationsResponse\"F\202\323\344\223\0027\0225/v1/{p"
+ + "arent=projects/*/locations/*}/dnsAuthori"
+ + "zations\332A\006parent\022\321\001\n\023GetDnsAuthorization"
+ + "\022>.google.cloud.certificatemanager.v1.Ge"
+ + "tDnsAuthorizationRequest\0324.google.cloud."
+ + "certificatemanager.v1.DnsAuthorization\"D"
+ + "\202\323\344\223\0027\0225/v1/{name=projects/*/locations/*"
+ + "/dnsAuthorizations/*}\332A\004name\022\245\002\n\026CreateD"
+ + "nsAuthorization\022A.google.cloud.certifica"
+ + "temanager.v1.CreateDnsAuthorizationReque"
+ + "st\032\035.google.longrunning.Operation\"\250\001\202\323\344\223"
+ + "\002J\"5/v1/{parent=projects/*/locations/*}/"
+ + "dnsAuthorizations:\021dns_authorization\332A-p"
+ + "arent,dns_authorization,dns_authorizatio"
+ + "n_id\312A%\n\020DnsAuthorization\022\021OperationMeta"
+ + "data\022\247\002\n\026UpdateDnsAuthorization\022A.google"
+ + ".cloud.certificatemanager.v1.UpdateDnsAu"
+ + "thorizationRequest\032\035.google.longrunning."
+ + "Operation\"\252\001\202\323\344\223\002\\2G/v1/{dns_authorizati"
+ + "on.name=projects/*/locations/*/dnsAuthor"
+ + "izations/*}:\021dns_authorization\332A\035dns_aut"
+ + "horization,update_mask\312A%\n\020DnsAuthorizat"
+ + "ion\022\021OperationMetadata\022\355\001\n\026DeleteDnsAuth"
+ + "orization\022A.google.cloud.certificatemana"
+ + "ger.v1.DeleteDnsAuthorizationRequest\032\035.g"
+ + "oogle.longrunning.Operation\"q\202\323\344\223\0027*5/v1"
+ + "/{name=projects/*/locations/*/dnsAuthori"
+ + "zations/*}\332A\004name\312A*\n\025google.protobuf.Em"
+ + "pty\022\021OperationMetadata\032U\312A!certificatema"
+ + "nager.googleapis.com\322A.https://www.googl"
+ + "eapis.com/auth/cloud-platformB\213\002\n&com.go"
+ + "ogle.cloud.certificatemanager.v1B\027Certif"
+ + "icateManagerProtoP\001ZTgoogle.golang.org/g"
+ + "enproto/googleapis/cloud/certificatemana"
+ + "ger/v1;certificatemanager\252\002\"Google.Cloud"
+ + ".CertificateManager.V1\312\002\"Google\\Cloud\\Ce"
+ + "rtificateManager\\V1\352\002%Google::Cloud::Cer"
+ + "tificateManager::V1b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -957,7 +948,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
registry.add(com.google.api.ClientProto.methodSignature);
registry.add(com.google.api.ClientProto.oauthScopes);
registry.add(com.google.api.ResourceProto.resource);
- registry.add(com.google.api.ResourceProto.resourceDefinition);
registry.add(com.google.api.ResourceProto.resourceReference);
registry.add(com.google.longrunning.OperationsProto.operationInfo);
com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor(
diff --git a/java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMap.java b/java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMap.java
index ea01f7f9cf09..d73511098cbb 100644
--- a/java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMap.java
+++ b/java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMap.java
@@ -203,11 +203,11 @@ public interface GclbTargetOrBuilder
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetHttpsProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`.
*
*
- * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... }
+ * string target_https_proxy = 1;
*
* @return Whether the targetHttpsProxy field is set.
*/
@@ -216,11 +216,11 @@ public interface GclbTargetOrBuilder
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetHttpsProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`.
*
*
- * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... }
+ * string target_https_proxy = 1;
*
* @return The targetHttpsProxy.
*/
@@ -229,11 +229,11 @@ public interface GclbTargetOrBuilder
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetHttpsProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`.
*
*
- * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... }
+ * string target_https_proxy = 1;
*
* @return The bytes for targetHttpsProxy.
*/
@@ -243,11 +243,11 @@ public interface GclbTargetOrBuilder
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetSslProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetSslProxies/*`.
*
*
- * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... }
+ * string target_ssl_proxy = 3;
*
* @return Whether the targetSslProxy field is set.
*/
@@ -256,11 +256,11 @@ public interface GclbTargetOrBuilder
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetSslProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetSslProxies/*`.
*
*
- * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... }
+ * string target_ssl_proxy = 3;
*
* @return The targetSslProxy.
*/
@@ -269,11 +269,11 @@ public interface GclbTargetOrBuilder
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetSslProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetSslProxies/*`.
*
*
- * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... }
+ * string target_ssl_proxy = 3;
*
* @return The bytes for targetSslProxy.
*/
@@ -1498,11 +1498,11 @@ public TargetProxyCase getTargetProxyCase() {
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetHttpsProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`.
*
*
- * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... }
+ * string target_https_proxy = 1;
*
* @return Whether the targetHttpsProxy field is set.
*/
@@ -1513,11 +1513,11 @@ public boolean hasTargetHttpsProxy() {
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetHttpsProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`.
*
*
- * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... }
+ * string target_https_proxy = 1;
*
* @return The targetHttpsProxy.
*/
@@ -1541,11 +1541,11 @@ public java.lang.String getTargetHttpsProxy() {
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetHttpsProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`.
*
*
- * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... }
+ * string target_https_proxy = 1;
*
* @return The bytes for targetHttpsProxy.
*/
@@ -1571,11 +1571,11 @@ public com.google.protobuf.ByteString getTargetHttpsProxyBytes() {
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetSslProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetSslProxies/*`.
*
*
- * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... }
+ * string target_ssl_proxy = 3;
*
* @return Whether the targetSslProxy field is set.
*/
@@ -1586,11 +1586,11 @@ public boolean hasTargetSslProxy() {
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetSslProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetSslProxies/*`.
*
*
- * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... }
+ * string target_ssl_proxy = 3;
*
* @return The targetSslProxy.
*/
@@ -1614,11 +1614,11 @@ public java.lang.String getTargetSslProxy() {
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetSslProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetSslProxies/*`.
*
*
- * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... }
+ * string target_ssl_proxy = 3;
*
* @return The bytes for targetSslProxy.
*/
@@ -2185,11 +2185,11 @@ public Builder clearTargetProxy() {
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetHttpsProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`.
*
*
- * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... }
+ * string target_https_proxy = 1;
*
* @return Whether the targetHttpsProxy field is set.
*/
@@ -2201,11 +2201,11 @@ public boolean hasTargetHttpsProxy() {
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetHttpsProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`.
*
*
- * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... }
+ * string target_https_proxy = 1;
*
* @return The targetHttpsProxy.
*/
@@ -2230,11 +2230,11 @@ public java.lang.String getTargetHttpsProxy() {
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetHttpsProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`.
*
*
- * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... }
+ * string target_https_proxy = 1;
*
* @return The bytes for targetHttpsProxy.
*/
@@ -2259,11 +2259,11 @@ public com.google.protobuf.ByteString getTargetHttpsProxyBytes() {
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetHttpsProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`.
*
*
- * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... }
+ * string target_https_proxy = 1;
*
* @param value The targetHttpsProxy to set.
* @return This builder for chaining.
@@ -2281,11 +2281,11 @@ public Builder setTargetHttpsProxy(java.lang.String value) {
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetHttpsProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`.
*
*
- * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... }
+ * string target_https_proxy = 1;
*
* @return This builder for chaining.
*/
@@ -2301,11 +2301,11 @@ public Builder clearTargetHttpsProxy() {
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetHttpsProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`.
*
*
- * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... }
+ * string target_https_proxy = 1;
*
* @param value The bytes for targetHttpsProxy to set.
* @return This builder for chaining.
@@ -2325,11 +2325,11 @@ public Builder setTargetHttpsProxyBytes(com.google.protobuf.ByteString value) {
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetSslProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetSslProxies/*`.
*
*
- * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... }
+ * string target_ssl_proxy = 3;
*
* @return Whether the targetSslProxy field is set.
*/
@@ -2341,11 +2341,11 @@ public boolean hasTargetSslProxy() {
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetSslProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetSslProxies/*`.
*
*
- * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... }
+ * string target_ssl_proxy = 3;
*
* @return The targetSslProxy.
*/
@@ -2370,11 +2370,11 @@ public java.lang.String getTargetSslProxy() {
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetSslProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetSslProxies/*`.
*
*
- * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... }
+ * string target_ssl_proxy = 3;
*
* @return The bytes for targetSslProxy.
*/
@@ -2399,11 +2399,11 @@ public com.google.protobuf.ByteString getTargetSslProxyBytes() {
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetSslProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetSslProxies/*`.
*
*
- * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... }
+ * string target_ssl_proxy = 3;
*
* @param value The targetSslProxy to set.
* @return This builder for chaining.
@@ -2421,11 +2421,11 @@ public Builder setTargetSslProxy(java.lang.String value) {
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetSslProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetSslProxies/*`.
*
*
- * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... }
+ * string target_ssl_proxy = 3;
*
* @return This builder for chaining.
*/
@@ -2441,11 +2441,11 @@ public Builder clearTargetSslProxy() {
*
*
*
- * A name must be in the format
- * `projects/*/locations/*/targetSslProxies/*`.
+ * This field returns the resource name in the following format:
+ * `//compute.googleapis.com/projects/*/global/targetSslProxies/*`.
*
*
- * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... }
+ * string target_ssl_proxy = 3;
*
* @param value The bytes for targetSslProxy to set.
* @return This builder for chaining.
diff --git a/java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/proto/google/cloud/certificatemanager/v1/certificate_manager.proto b/java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/proto/google/cloud/certificatemanager/v1/certificate_manager.proto
index be7df241c17c..2b221da443fa 100644
--- a/java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/proto/google/cloud/certificatemanager/v1/certificate_manager.proto
+++ b/java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/proto/google/cloud/certificatemanager/v1/certificate_manager.proto
@@ -31,14 +31,6 @@ option java_outer_classname = "CertificateManagerProto";
option java_package = "com.google.cloud.certificatemanager.v1";
option php_namespace = "Google\\Cloud\\CertificateManager\\V1";
option ruby_package = "Google::Cloud::CertificateManager::V1";
-option (google.api.resource_definition) = {
- type: "compute.googleapis.com/TargetHttpsProxies"
- pattern: "projects/{project}/locations/{location}/targetHttpsProxies/{target_https_proxy}"
-};
-option (google.api.resource_definition) = {
- type: "compute.googleapis.com/TargetSslProxies"
- pattern: "projects/{project}/locations/{location}/targetSslProxies/{target_ssl_proxy}"
-};
// API Overview
//
@@ -912,17 +904,13 @@ message CertificateMap {
// A Target Proxy to which this map is attached to.
oneof target_proxy {
- // A name must be in the format
- // `projects/*/locations/*/targetHttpsProxies/*`.
- string target_https_proxy = 1 [(google.api.resource_reference) = {
- type: "compute.googleapis.com/TargetHttpsProxies"
- }];
-
- // A name must be in the format
- // `projects/*/locations/*/targetSslProxies/*`.
- string target_ssl_proxy = 3 [(google.api.resource_reference) = {
- type: "compute.googleapis.com/TargetSslProxies"
- }];
+ // This field returns the resource name in the following format:
+ // `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`.
+ string target_https_proxy = 1;
+
+ // This field returns the resource name in the following format:
+ // `//compute.googleapis.com/projects/*/global/targetSslProxies/*`.
+ string target_ssl_proxy = 3;
}
// IP configurations for this Target Proxy where the
diff --git a/java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanagerclient/getlocation/AsyncGetLocation.java b/java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanagerclient/getlocation/AsyncGetLocation.java
new file mode 100644
index 000000000000..feb583d5f8b8
--- /dev/null
+++ b/java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanagerclient/getlocation/AsyncGetLocation.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://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.
+ */
+
+package com.google.cloud.certificatemanager.v1.samples;
+
+// [START certificatemanager_v1_generated_certificatemanagerclient_getlocation_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.certificatemanager.v1.CertificateManagerClient;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.Location;
+
+public class AsyncGetLocation {
+
+ public static void main(String[] args) throws Exception {
+ asyncGetLocation();
+ }
+
+ public static void asyncGetLocation() throws Exception {
+ // This snippet has been automatically generated for illustrative purposes only.
+ // It may require modifications to work in your environment.
+ try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ ApiFuture future =
+ certificateManagerClient.getLocationCallable().futureCall(request);
+ // Do something.
+ Location response = future.get();
+ }
+ }
+}
+// [END certificatemanager_v1_generated_certificatemanagerclient_getlocation_async]
diff --git a/java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanagerclient/getlocation/SyncGetLocation.java b/java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanagerclient/getlocation/SyncGetLocation.java
new file mode 100644
index 000000000000..a62744ee6c23
--- /dev/null
+++ b/java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanagerclient/getlocation/SyncGetLocation.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://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.
+ */
+
+package com.google.cloud.certificatemanager.v1.samples;
+
+// [START certificatemanager_v1_generated_certificatemanagerclient_getlocation_sync]
+import com.google.cloud.certificatemanager.v1.CertificateManagerClient;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.Location;
+
+public class SyncGetLocation {
+
+ public static void main(String[] args) throws Exception {
+ syncGetLocation();
+ }
+
+ public static void syncGetLocation() throws Exception {
+ // This snippet has been automatically generated for illustrative purposes only.
+ // It may require modifications to work in your environment.
+ try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ Location response = certificateManagerClient.getLocation(request);
+ }
+ }
+}
+// [END certificatemanager_v1_generated_certificatemanagerclient_getlocation_sync]
diff --git a/java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanagerclient/listlocations/AsyncListLocations.java b/java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanagerclient/listlocations/AsyncListLocations.java
new file mode 100644
index 000000000000..62924a53b8b9
--- /dev/null
+++ b/java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanagerclient/listlocations/AsyncListLocations.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://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.
+ */
+
+package com.google.cloud.certificatemanager.v1.samples;
+
+// [START certificatemanager_v1_generated_certificatemanagerclient_listlocations_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.certificatemanager.v1.CertificateManagerClient;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.Location;
+
+public class AsyncListLocations {
+
+ public static void main(String[] args) throws Exception {
+ asyncListLocations();
+ }
+
+ public static void asyncListLocations() throws Exception {
+ // This snippet has been automatically generated for illustrative purposes only.
+ // It may require modifications to work in your environment.
+ try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ ListLocationsRequest request =
+ ListLocationsRequest.newBuilder()
+ .setName("name3373707")
+ .setFilter("filter-1274492040")
+ .setPageSize(883849137)
+ .setPageToken("pageToken873572522")
+ .build();
+ ApiFuture future =
+ certificateManagerClient.listLocationsPagedCallable().futureCall(request);
+ // Do something.
+ for (Location element : future.get().iterateAll()) {
+ // doThingsWith(element);
+ }
+ }
+ }
+}
+// [END certificatemanager_v1_generated_certificatemanagerclient_listlocations_async]
diff --git a/java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanagerclient/listlocations/AsyncListLocationsPaged.java b/java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanagerclient/listlocations/AsyncListLocationsPaged.java
new file mode 100644
index 000000000000..20a545ea4e15
--- /dev/null
+++ b/java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanagerclient/listlocations/AsyncListLocationsPaged.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://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.
+ */
+
+package com.google.cloud.certificatemanager.v1.samples;
+
+// [START certificatemanager_v1_generated_certificatemanagerclient_listlocations_paged_async]
+import com.google.cloud.certificatemanager.v1.CertificateManagerClient;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.common.base.Strings;
+
+public class AsyncListLocationsPaged {
+
+ public static void main(String[] args) throws Exception {
+ asyncListLocationsPaged();
+ }
+
+ public static void asyncListLocationsPaged() throws Exception {
+ // This snippet has been automatically generated for illustrative purposes only.
+ // It may require modifications to work in your environment.
+ try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ ListLocationsRequest request =
+ ListLocationsRequest.newBuilder()
+ .setName("name3373707")
+ .setFilter("filter-1274492040")
+ .setPageSize(883849137)
+ .setPageToken("pageToken873572522")
+ .build();
+ while (true) {
+ ListLocationsResponse response =
+ certificateManagerClient.listLocationsCallable().call(request);
+ for (Location element : response.getLocationsList()) {
+ // doThingsWith(element);
+ }
+ String nextPageToken = response.getNextPageToken();
+ if (!Strings.isNullOrEmpty(nextPageToken)) {
+ request = request.toBuilder().setPageToken(nextPageToken).build();
+ } else {
+ break;
+ }
+ }
+ }
+ }
+}
+// [END certificatemanager_v1_generated_certificatemanagerclient_listlocations_paged_async]
diff --git a/java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanagerclient/listlocations/SyncListLocations.java b/java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanagerclient/listlocations/SyncListLocations.java
new file mode 100644
index 000000000000..1b2551108e50
--- /dev/null
+++ b/java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanagerclient/listlocations/SyncListLocations.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://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.
+ */
+
+package com.google.cloud.certificatemanager.v1.samples;
+
+// [START certificatemanager_v1_generated_certificatemanagerclient_listlocations_sync]
+import com.google.cloud.certificatemanager.v1.CertificateManagerClient;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.Location;
+
+public class SyncListLocations {
+
+ public static void main(String[] args) throws Exception {
+ syncListLocations();
+ }
+
+ public static void syncListLocations() throws Exception {
+ // This snippet has been automatically generated for illustrative purposes only.
+ // It may require modifications to work in your environment.
+ try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ ListLocationsRequest request =
+ ListLocationsRequest.newBuilder()
+ .setName("name3373707")
+ .setFilter("filter-1274492040")
+ .setPageSize(883849137)
+ .setPageToken("pageToken873572522")
+ .build();
+ for (Location element : certificateManagerClient.listLocations(request).iterateAll()) {
+ // doThingsWith(element);
+ }
+ }
+ }
+}
+// [END certificatemanager_v1_generated_certificatemanagerclient_listlocations_sync]