@@ -714,6 +714,212 @@ public final EkmConnection updateEkmConnection(UpdateEkmConnectionRequest reques
714
714
return stub .updateEkmConnectionCallable ();
715
715
}
716
716
717
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
718
+ /**
719
+ * Returns the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource for a given project
720
+ * and location.
721
+ *
722
+ * <p>Sample code:
723
+ *
724
+ * <pre>{@code
725
+ * // This snippet has been automatically generated and should be regarded as a code template only.
726
+ * // It will require modifications to work:
727
+ * // - It may require correct/in-range values for request initialization.
728
+ * // - It may require specifying regional endpoints when creating the service client as shown in
729
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
730
+ * try (EkmServiceClient ekmServiceClient = EkmServiceClient.create()) {
731
+ * EkmConfigName name = EkmConfigName.of("[PROJECT]", "[LOCATION]");
732
+ * EkmConfig response = ekmServiceClient.getEkmConfig(name);
733
+ * }
734
+ * }</pre>
735
+ *
736
+ * @param name Required. The [name][google.cloud.kms.v1.EkmConfig.name] of the
737
+ * [EkmConfig][google.cloud.kms.v1.EkmConfig] to get.
738
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
739
+ */
740
+ public final EkmConfig getEkmConfig (EkmConfigName name ) {
741
+ GetEkmConfigRequest request =
742
+ GetEkmConfigRequest .newBuilder ().setName (name == null ? null : name .toString ()).build ();
743
+ return getEkmConfig (request );
744
+ }
745
+
746
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
747
+ /**
748
+ * Returns the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource for a given project
749
+ * and location.
750
+ *
751
+ * <p>Sample code:
752
+ *
753
+ * <pre>{@code
754
+ * // This snippet has been automatically generated and should be regarded as a code template only.
755
+ * // It will require modifications to work:
756
+ * // - It may require correct/in-range values for request initialization.
757
+ * // - It may require specifying regional endpoints when creating the service client as shown in
758
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
759
+ * try (EkmServiceClient ekmServiceClient = EkmServiceClient.create()) {
760
+ * String name = EkmConfigName.of("[PROJECT]", "[LOCATION]").toString();
761
+ * EkmConfig response = ekmServiceClient.getEkmConfig(name);
762
+ * }
763
+ * }</pre>
764
+ *
765
+ * @param name Required. The [name][google.cloud.kms.v1.EkmConfig.name] of the
766
+ * [EkmConfig][google.cloud.kms.v1.EkmConfig] to get.
767
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
768
+ */
769
+ public final EkmConfig getEkmConfig (String name ) {
770
+ GetEkmConfigRequest request = GetEkmConfigRequest .newBuilder ().setName (name ).build ();
771
+ return getEkmConfig (request );
772
+ }
773
+
774
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
775
+ /**
776
+ * Returns the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource for a given project
777
+ * and location.
778
+ *
779
+ * <p>Sample code:
780
+ *
781
+ * <pre>{@code
782
+ * // This snippet has been automatically generated and should be regarded as a code template only.
783
+ * // It will require modifications to work:
784
+ * // - It may require correct/in-range values for request initialization.
785
+ * // - It may require specifying regional endpoints when creating the service client as shown in
786
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
787
+ * try (EkmServiceClient ekmServiceClient = EkmServiceClient.create()) {
788
+ * GetEkmConfigRequest request =
789
+ * GetEkmConfigRequest.newBuilder()
790
+ * .setName(EkmConfigName.of("[PROJECT]", "[LOCATION]").toString())
791
+ * .build();
792
+ * EkmConfig response = ekmServiceClient.getEkmConfig(request);
793
+ * }
794
+ * }</pre>
795
+ *
796
+ * @param request The request object containing all of the parameters for the API call.
797
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
798
+ */
799
+ public final EkmConfig getEkmConfig (GetEkmConfigRequest request ) {
800
+ return getEkmConfigCallable ().call (request );
801
+ }
802
+
803
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
804
+ /**
805
+ * Returns the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource for a given project
806
+ * and location.
807
+ *
808
+ * <p>Sample code:
809
+ *
810
+ * <pre>{@code
811
+ * // This snippet has been automatically generated and should be regarded as a code template only.
812
+ * // It will require modifications to work:
813
+ * // - It may require correct/in-range values for request initialization.
814
+ * // - It may require specifying regional endpoints when creating the service client as shown in
815
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
816
+ * try (EkmServiceClient ekmServiceClient = EkmServiceClient.create()) {
817
+ * GetEkmConfigRequest request =
818
+ * GetEkmConfigRequest.newBuilder()
819
+ * .setName(EkmConfigName.of("[PROJECT]", "[LOCATION]").toString())
820
+ * .build();
821
+ * ApiFuture<EkmConfig> future = ekmServiceClient.getEkmConfigCallable().futureCall(request);
822
+ * // Do something.
823
+ * EkmConfig response = future.get();
824
+ * }
825
+ * }</pre>
826
+ */
827
+ public final UnaryCallable <GetEkmConfigRequest , EkmConfig > getEkmConfigCallable () {
828
+ return stub .getEkmConfigCallable ();
829
+ }
830
+
831
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
832
+ /**
833
+ * Updates the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource for a given project
834
+ * and location.
835
+ *
836
+ * <p>Sample code:
837
+ *
838
+ * <pre>{@code
839
+ * // This snippet has been automatically generated and should be regarded as a code template only.
840
+ * // It will require modifications to work:
841
+ * // - It may require correct/in-range values for request initialization.
842
+ * // - It may require specifying regional endpoints when creating the service client as shown in
843
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
844
+ * try (EkmServiceClient ekmServiceClient = EkmServiceClient.create()) {
845
+ * EkmConfig ekmConfig = EkmConfig.newBuilder().build();
846
+ * FieldMask updateMask = FieldMask.newBuilder().build();
847
+ * EkmConfig response = ekmServiceClient.updateEkmConfig(ekmConfig, updateMask);
848
+ * }
849
+ * }</pre>
850
+ *
851
+ * @param ekmConfig Required. [EkmConfig][google.cloud.kms.v1.EkmConfig] with updated values.
852
+ * @param updateMask Required. List of fields to be updated in this request.
853
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
854
+ */
855
+ public final EkmConfig updateEkmConfig (EkmConfig ekmConfig , FieldMask updateMask ) {
856
+ UpdateEkmConfigRequest request =
857
+ UpdateEkmConfigRequest .newBuilder ()
858
+ .setEkmConfig (ekmConfig )
859
+ .setUpdateMask (updateMask )
860
+ .build ();
861
+ return updateEkmConfig (request );
862
+ }
863
+
864
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
865
+ /**
866
+ * Updates the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource for a given project
867
+ * and location.
868
+ *
869
+ * <p>Sample code:
870
+ *
871
+ * <pre>{@code
872
+ * // This snippet has been automatically generated and should be regarded as a code template only.
873
+ * // It will require modifications to work:
874
+ * // - It may require correct/in-range values for request initialization.
875
+ * // - It may require specifying regional endpoints when creating the service client as shown in
876
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
877
+ * try (EkmServiceClient ekmServiceClient = EkmServiceClient.create()) {
878
+ * UpdateEkmConfigRequest request =
879
+ * UpdateEkmConfigRequest.newBuilder()
880
+ * .setEkmConfig(EkmConfig.newBuilder().build())
881
+ * .setUpdateMask(FieldMask.newBuilder().build())
882
+ * .build();
883
+ * EkmConfig response = ekmServiceClient.updateEkmConfig(request);
884
+ * }
885
+ * }</pre>
886
+ *
887
+ * @param request The request object containing all of the parameters for the API call.
888
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
889
+ */
890
+ public final EkmConfig updateEkmConfig (UpdateEkmConfigRequest request ) {
891
+ return updateEkmConfigCallable ().call (request );
892
+ }
893
+
894
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
895
+ /**
896
+ * Updates the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource for a given project
897
+ * and location.
898
+ *
899
+ * <p>Sample code:
900
+ *
901
+ * <pre>{@code
902
+ * // This snippet has been automatically generated and should be regarded as a code template only.
903
+ * // It will require modifications to work:
904
+ * // - It may require correct/in-range values for request initialization.
905
+ * // - It may require specifying regional endpoints when creating the service client as shown in
906
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
907
+ * try (EkmServiceClient ekmServiceClient = EkmServiceClient.create()) {
908
+ * UpdateEkmConfigRequest request =
909
+ * UpdateEkmConfigRequest.newBuilder()
910
+ * .setEkmConfig(EkmConfig.newBuilder().build())
911
+ * .setUpdateMask(FieldMask.newBuilder().build())
912
+ * .build();
913
+ * ApiFuture<EkmConfig> future = ekmServiceClient.updateEkmConfigCallable().futureCall(request);
914
+ * // Do something.
915
+ * EkmConfig response = future.get();
916
+ * }
917
+ * }</pre>
918
+ */
919
+ public final UnaryCallable <UpdateEkmConfigRequest , EkmConfig > updateEkmConfigCallable () {
920
+ return stub .updateEkmConfigCallable ();
921
+ }
922
+
717
923
// AUTO-GENERATED DOCUMENTATION AND METHOD.
718
924
/**
719
925
* Lists information about the supported locations for this service.
0 commit comments