com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny .getDefaultInstance())) .build();
@Test public void testToProto() { CreateAppProfileRequest wrapper = CreateAppProfileRequest.of("my-instance", "my-profile") .setDescription("my description") .setRoutingPolicy(SingleClusterRoutingPolicy.of("my-cluster", true)) .setIgnoreWarnings(true); assertThat(wrapper.toProto("my-project")) .isEqualTo( com.google.bigtable.admin.v2.CreateAppProfileRequest.newBuilder() .setParent(InstanceName.of("my-project", "my-instance").toString()) .setAppProfileId("my-profile") .setAppProfile( com.google.bigtable.admin.v2.AppProfile.newBuilder() .setDescription("my description") .setSingleClusterRouting( SingleClusterRouting.newBuilder() .setClusterId("my-cluster") .setAllowTransactionalWrites(true))) .setIgnoreWarnings(true) .build()); }
.setAppProfileId(appProfileId) .setAppProfile(appProfile) .build(); return createAppProfile(request);
.setAppProfileId(appProfileId) .setAppProfile(appProfile) .build(); return createAppProfile(request);
/** * Creates the request protobuf. This method is considered an internal implementation detail and * not meant to be used by applications. */ @InternalApi public com.google.bigtable.admin.v2.CreateAppProfileRequest toProto(String projectId) { String name = NameUtil.formatInstanceName(projectId, instanceId); return proto.setParent(name).build(); } }
.setAppProfileId(appProfileId) .setAppProfile(appProfile) .build(); return createAppProfile(request);
.setAppProfileId(appProfileId) .setAppProfile(appProfile) .build(); return createAppProfile(request);
/** * Creates the request protobuf. This method is considered an internal implementation detail and * not meant to be used by applications. */ @InternalApi public com.google.bigtable.admin.v2.CreateAppProfileRequest toProto(String projectId) { String name = NameUtil.formatInstanceName(projectId, instanceId); return proto.setParent(name).build(); } }