expectedProtos.add( com.google.bigtable.admin.v2.AppProfile.newBuilder() .setName(APP_PROFILE_NAME + i) .setDescription("profile" + i) .setMultiClusterRoutingUseAny( com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny .getDefaultInstance()) .build());
/** Sets the routing policy for all read/write requests that use this app profile. */ @SuppressWarnings("WeakerAccess") public UpdateAppProfileRequest setRoutingPolicy(@Nonnull RoutingPolicy routingPolicy) { Preconditions.checkNotNull(routingPolicy); if (routingPolicy instanceof MultiClusterRoutingPolicy) { proto .getAppProfileBuilder() .setMultiClusterRoutingUseAny(((MultiClusterRoutingPolicy) routingPolicy).toProto()); updateFieldMask( com.google.bigtable.admin.v2.AppProfile.MULTI_CLUSTER_ROUTING_USE_ANY_FIELD_NUMBER); } else if (routingPolicy instanceof SingleClusterRoutingPolicy) { proto .getAppProfileBuilder() .setSingleClusterRouting(((SingleClusterRoutingPolicy) routingPolicy).toProto()); updateFieldMask(com.google.bigtable.admin.v2.AppProfile.SINGLE_CLUSTER_ROUTING_FIELD_NUMBER); } else { throw new IllegalArgumentException("Unknown policy type: " + routingPolicy); } return this; }
com.google.bigtable.admin.v2.AppProfile.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(appProfile_); appProfile_ = subBuilder.buildPartial();
com.google.bigtable.admin.v2.AppProfile.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(appProfile_); appProfile_ = subBuilder.buildPartial();
com.google.bigtable.admin.v2.AppProfile.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(appProfile_); appProfile_ = subBuilder.buildPartial();
com.google.bigtable.admin.v2.AppProfile.SingleClusterRoutingOrBuilder>( (com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) routingPolicy_, getParentForChildren(), isClean()); routingPolicy_ = null; onChanged();
com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAnyOrBuilder>( (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) routingPolicy_, getParentForChildren(), isClean()); routingPolicy_ = null; onChanged();
/** * * * <pre> * The app profile to be created. * Fields marked `OutputOnly` will be ignored. * </pre> * * <code>.google.bigtable.admin.v2.AppProfile app_profile = 3;</code> */ public Builder mergeAppProfile(com.google.bigtable.admin.v2.AppProfile value) { if (appProfileBuilder_ == null) { if (appProfile_ != null) { appProfile_ = com.google.bigtable.admin.v2.AppProfile.newBuilder(appProfile_) .mergeFrom(value) .buildPartial(); } else { appProfile_ = value; } onChanged(); } else { appProfileBuilder_.mergeFrom(value); } return this; } /**
/** * * * <pre> * The app profile which will (partially) replace the current value. * </pre> * * <code>.google.bigtable.admin.v2.AppProfile app_profile = 1;</code> */ public Builder mergeAppProfile(com.google.bigtable.admin.v2.AppProfile value) { if (appProfileBuilder_ == null) { if (appProfile_ != null) { appProfile_ = com.google.bigtable.admin.v2.AppProfile.newBuilder(appProfile_) .mergeFrom(value) .buildPartial(); } else { appProfile_ = value; } onChanged(); } else { appProfileBuilder_.mergeFrom(value); } return this; } /**
/** * * * <pre> * The list of requested app profiles. * </pre> * * <code>repeated .google.bigtable.admin.v2.AppProfile app_profiles = 1;</code> */ public Builder setAppProfiles( int index, com.google.bigtable.admin.v2.AppProfile.Builder builderForValue) { if (appProfilesBuilder_ == null) { ensureAppProfilesIsMutable(); appProfiles_.set(index, builderForValue.build()); onChanged(); } else { appProfilesBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** Sets the routing policy for all read/write requests that use this app profile. */ @SuppressWarnings("WeakerAccess") public UpdateAppProfileRequest setRoutingPolicy(@Nonnull RoutingPolicy routingPolicy) { Preconditions.checkNotNull(routingPolicy); if (routingPolicy instanceof MultiClusterRoutingPolicy) { proto .getAppProfileBuilder() .setMultiClusterRoutingUseAny(((MultiClusterRoutingPolicy) routingPolicy).toProto()); updateFieldMask( com.google.bigtable.admin.v2.AppProfile.MULTI_CLUSTER_ROUTING_USE_ANY_FIELD_NUMBER); } else if (routingPolicy instanceof SingleClusterRoutingPolicy) { proto .getAppProfileBuilder() .setSingleClusterRouting(((SingleClusterRoutingPolicy) routingPolicy).toProto()); updateFieldMask(com.google.bigtable.admin.v2.AppProfile.SINGLE_CLUSTER_ROUTING_FIELD_NUMBER); } else { throw new IllegalArgumentException("Unknown policy type: " + routingPolicy); } return this; }
/** * * * <pre> * The app profile to be created. * Fields marked `OutputOnly` will be ignored. * </pre> * * <code>.google.bigtable.admin.v2.AppProfile app_profile = 3;</code> */ public Builder setAppProfile(com.google.bigtable.admin.v2.AppProfile.Builder builderForValue) { if (appProfileBuilder_ == null) { appProfile_ = builderForValue.build(); onChanged(); } else { appProfileBuilder_.setMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * The list of requested app profiles. * </pre> * * <code>repeated .google.bigtable.admin.v2.AppProfile app_profiles = 1;</code> */ public Builder addAppProfiles( int index, com.google.bigtable.admin.v2.AppProfile.Builder builderForValue) { if (appProfilesBuilder_ == null) { ensureAppProfilesIsMutable(); appProfiles_.add(index, builderForValue.build()); onChanged(); } else { appProfilesBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * The app profile which will (partially) replace the current value. * </pre> * * <code>.google.bigtable.admin.v2.AppProfile app_profile = 1;</code> */ public Builder setAppProfile(com.google.bigtable.admin.v2.AppProfile.Builder builderForValue) { if (appProfileBuilder_ == null) { appProfile_ = builderForValue.build(); onChanged(); } else { appProfileBuilder_.setMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * The list of requested app profiles. * </pre> * * <code>repeated .google.bigtable.admin.v2.AppProfile app_profiles = 1;</code> */ public Builder addAppProfiles(com.google.bigtable.admin.v2.AppProfile.Builder builderForValue) { if (appProfilesBuilder_ == null) { ensureAppProfilesIsMutable(); appProfiles_.add(builderForValue.build()); onChanged(); } else { appProfilesBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** Sets the routing policy for all read/write requests that use this app profile. */ @SuppressWarnings("WeakerAccess") public CreateAppProfileRequest setRoutingPolicy(RoutingPolicy routingPolicy) { Preconditions.checkNotNull(routingPolicy); if (routingPolicy instanceof MultiClusterRoutingPolicy) { proto .getAppProfileBuilder() .setMultiClusterRoutingUseAny(((MultiClusterRoutingPolicy) routingPolicy).toProto()); } else if (routingPolicy instanceof SingleClusterRoutingPolicy) { proto .getAppProfileBuilder() .setSingleClusterRouting(((SingleClusterRoutingPolicy) routingPolicy).toProto()); } else { throw new IllegalArgumentException("Unknown policy type: " + routingPolicy); } return this; }
/** * * * <pre> * Use a multi-cluster routing policy that may pick any cluster. * </pre> * * <code> * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5; * </code> */ public com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.Builder getMultiClusterRoutingUseAnyBuilder() { return getMultiClusterRoutingUseAnyFieldBuilder().getBuilder(); } /**
@java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**
@java.lang.Override public com.google.bigtable.admin.v2.AppProfile build() { com.google.bigtable.admin.v2.AppProfile result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }