@Override public Map<String, String> extract(UpdateAppProfileRequest request) { ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); params.put( "app_profile.name", String.valueOf(request.getAppProfile().getName())); return params.build(); } })
private AppProfile(@Nonnull com.google.bigtable.admin.v2.AppProfile proto) { Preconditions.checkNotNull(proto); Preconditions.checkArgument( proto.hasSingleClusterRouting() || proto.hasMultiClusterRoutingUseAny(), "AppProfile must have a routing policy"); Preconditions.checkArgument(!proto.getName().isEmpty(), "AppProfile must have a name"); this.proto = proto; }
/** * * * <pre> * (`OutputOnly`) * The unique name of the app profile. Values are of the form * `projects/<project>/instances/<instance>/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
/** Gets the id of this AppProfile. */ @SuppressWarnings("WeakerAccess") public String getId() { AppProfileName fullName = Verify.verifyNotNull(AppProfileName.parse(proto.getName()), "Name can never be null"); //noinspection ConstantConditions return fullName.getAppProfile(); }
/** Gets the id of the instance that owns this AppProfile. */ @SuppressWarnings("WeakerAccess") public String getInstanceId() { AppProfileName fullName = Verify.verifyNotNull(AppProfileName.parse(proto.getName()), "Name can never be null"); //noinspection ConstantConditions return fullName.getInstance(); }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + ETAG_FIELD_NUMBER; hash = (53 * hash) + getEtag().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); switch (routingPolicyCase_) { case 5: hash = (37 * hash) + MULTI_CLUSTER_ROUTING_USE_ANY_FIELD_NUMBER; hash = (53 * hash) + getMultiClusterRoutingUseAny().hashCode(); break; case 6: hash = (37 * hash) + SINGLE_CLUSTER_ROUTING_FIELD_NUMBER; hash = (53 * hash) + getSingleClusterRouting().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.admin.v2.AppProfile)) { return super.equals(obj); } com.google.bigtable.admin.v2.AppProfile other = (com.google.bigtable.admin.v2.AppProfile) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && getEtag().equals(other.getEtag()); result = result && getDescription().equals(other.getDescription()); result = result && getRoutingPolicyCase().equals(other.getRoutingPolicyCase()); if (!result) return false; switch (routingPolicyCase_) { case 5: result = result && getMultiClusterRoutingUseAny().equals(other.getMultiClusterRoutingUseAny()); break; case 6: result = result && getSingleClusterRouting().equals(other.getSingleClusterRouting()); break; case 0: default: } result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(com.google.bigtable.admin.v2.AppProfile other) { if (other == com.google.bigtable.admin.v2.AppProfile.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged();
@Override public Map<String, String> extract(UpdateAppProfileRequest request) { ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); params.put( "app_profile.name", String.valueOf(request.getAppProfile().getName())); return params.build(); } })
private AppProfile(@Nonnull com.google.bigtable.admin.v2.AppProfile proto) { Preconditions.checkNotNull(proto); Preconditions.checkArgument( proto.hasSingleClusterRouting() || proto.hasMultiClusterRoutingUseAny(), "AppProfile must have a routing policy"); Preconditions.checkArgument(!proto.getName().isEmpty(), "AppProfile must have a name"); this.proto = proto; }
/** * * * <pre> * (`OutputOnly`) * The unique name of the app profile. Values are of the form * `projects/<project>/instances/<instance>/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
/** Gets the id of this AppProfile. */ @SuppressWarnings("WeakerAccess") public String getId() { AppProfileName fullName = Verify.verifyNotNull(AppProfileName.parse(proto.getName()), "Name can never be null"); //noinspection ConstantConditions return fullName.getAppProfile(); }
/** Gets the id of the instance that owns this AppProfile. */ @SuppressWarnings("WeakerAccess") public String getInstanceId() { AppProfileName fullName = Verify.verifyNotNull(AppProfileName.parse(proto.getName()), "Name can never be null"); //noinspection ConstantConditions return fullName.getInstance(); }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + ETAG_FIELD_NUMBER; hash = (53 * hash) + getEtag().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); switch (routingPolicyCase_) { case 5: hash = (37 * hash) + MULTI_CLUSTER_ROUTING_USE_ANY_FIELD_NUMBER; hash = (53 * hash) + getMultiClusterRoutingUseAny().hashCode(); break; case 6: hash = (37 * hash) + SINGLE_CLUSTER_ROUTING_FIELD_NUMBER; hash = (53 * hash) + getSingleClusterRouting().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.admin.v2.AppProfile)) { return super.equals(obj); } com.google.bigtable.admin.v2.AppProfile other = (com.google.bigtable.admin.v2.AppProfile) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && getEtag().equals(other.getEtag()); result = result && getDescription().equals(other.getDescription()); result = result && getRoutingPolicyCase().equals(other.getRoutingPolicyCase()); if (!result) return false; switch (routingPolicyCase_) { case 5: result = result && getMultiClusterRoutingUseAny().equals(other.getMultiClusterRoutingUseAny()); break; case 6: result = result && getSingleClusterRouting().equals(other.getSingleClusterRouting()); break; case 0: default: } result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(com.google.bigtable.admin.v2.AppProfile other) { if (other == com.google.bigtable.admin.v2.AppProfile.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged();