@@ -3185,6 +3185,148 @@ public List set(String parameterName, Object value) {
31853185 return (List) super.set(parameterName, value);
31863186 }
31873187 }
3188+ /**
3189+ * Replace an Instance.
3190+ *
3191+ * Create a request for the method "instances.replaceInstance".
3192+ *
3193+ * This request holds the parameters needed by the run server. After setting any optional
3194+ * parameters, call the {@link ReplaceInstance#execute()} method to invoke the remote operation.
3195+ *
3196+ * @param name Required. The name of the Instance being replaced. Replace {namespace} with the project ID or
3197+ * number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID
3198+ * @param content the {@link com.google.api.services.run.v1.model.Instance}
3199+ * @return the request
3200+ */
3201+ public ReplaceInstance replaceInstance(java.lang.String name, com.google.api.services.run.v1.model.Instance content) throws java.io.IOException {
3202+ ReplaceInstance result = new ReplaceInstance(name, content);
3203+ initialize(result);
3204+ return result;
3205+ }
3206+
3207+ public class ReplaceInstance extends CloudRunRequest<com.google.api.services.run.v1.model.Instance> {
3208+
3209+ private static final String REST_PATH = "apis/run.googleapis.com/v1/{+name}";
3210+
3211+ private final java.util.regex.Pattern NAME_PATTERN =
3212+ java.util.regex.Pattern.compile("^namespaces/[^/]+/instances/[^/]+$");
3213+
3214+ /**
3215+ * Replace an Instance.
3216+ *
3217+ * Create a request for the method "instances.replaceInstance".
3218+ *
3219+ * This request holds the parameters needed by the the run server. After setting any optional
3220+ * parameters, call the {@link ReplaceInstance#execute()} method to invoke the remote operation.
3221+ * <p> {@link ReplaceInstance#initialize(com.google.api.client.googleapis.services.AbstractGoogleC
3222+ * lientRequest)} must be called to initialize this instance immediately after invoking the
3223+ * constructor. </p>
3224+ *
3225+ * @param name Required. The name of the Instance being replaced. Replace {namespace} with the project ID or
3226+ * number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID
3227+ * @param content the {@link com.google.api.services.run.v1.model.Instance}
3228+ * @since 1.13
3229+ */
3230+ protected ReplaceInstance(java.lang.String name, com.google.api.services.run.v1.model.Instance content) {
3231+ super(CloudRun.this, "PUT", REST_PATH, content, com.google.api.services.run.v1.model.Instance.class);
3232+ this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
3233+ if (!getSuppressPatternChecks()) {
3234+ com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
3235+ "Parameter name must conform to the pattern " +
3236+ "^namespaces/[^/]+/instances/[^/]+$");
3237+ }
3238+ }
3239+
3240+ @Override
3241+ public ReplaceInstance set$Xgafv(java.lang.String $Xgafv) {
3242+ return (ReplaceInstance) super.set$Xgafv($Xgafv);
3243+ }
3244+
3245+ @Override
3246+ public ReplaceInstance setAccessToken(java.lang.String accessToken) {
3247+ return (ReplaceInstance) super.setAccessToken(accessToken);
3248+ }
3249+
3250+ @Override
3251+ public ReplaceInstance setAlt(java.lang.String alt) {
3252+ return (ReplaceInstance) super.setAlt(alt);
3253+ }
3254+
3255+ @Override
3256+ public ReplaceInstance setCallback(java.lang.String callback) {
3257+ return (ReplaceInstance) super.setCallback(callback);
3258+ }
3259+
3260+ @Override
3261+ public ReplaceInstance setFields(java.lang.String fields) {
3262+ return (ReplaceInstance) super.setFields(fields);
3263+ }
3264+
3265+ @Override
3266+ public ReplaceInstance setKey(java.lang.String key) {
3267+ return (ReplaceInstance) super.setKey(key);
3268+ }
3269+
3270+ @Override
3271+ public ReplaceInstance setOauthToken(java.lang.String oauthToken) {
3272+ return (ReplaceInstance) super.setOauthToken(oauthToken);
3273+ }
3274+
3275+ @Override
3276+ public ReplaceInstance setPrettyPrint(java.lang.Boolean prettyPrint) {
3277+ return (ReplaceInstance) super.setPrettyPrint(prettyPrint);
3278+ }
3279+
3280+ @Override
3281+ public ReplaceInstance setQuotaUser(java.lang.String quotaUser) {
3282+ return (ReplaceInstance) super.setQuotaUser(quotaUser);
3283+ }
3284+
3285+ @Override
3286+ public ReplaceInstance setUploadType(java.lang.String uploadType) {
3287+ return (ReplaceInstance) super.setUploadType(uploadType);
3288+ }
3289+
3290+ @Override
3291+ public ReplaceInstance setUploadProtocol(java.lang.String uploadProtocol) {
3292+ return (ReplaceInstance) super.setUploadProtocol(uploadProtocol);
3293+ }
3294+
3295+ /**
3296+ * Required. The name of the Instance being replaced. Replace {namespace} with the project
3297+ * ID or number. It takes the form namespaces/{namespace}. For example:
3298+ * namespaces/PROJECT_ID
3299+ */
3300+ @com.google.api.client.util.Key
3301+ private java.lang.String name;
3302+
3303+ /** Required. The name of the Instance being replaced. Replace {namespace} with the project ID or
3304+ number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID
3305+ */
3306+ public java.lang.String getName() {
3307+ return name;
3308+ }
3309+
3310+ /**
3311+ * Required. The name of the Instance being replaced. Replace {namespace} with the project
3312+ * ID or number. It takes the form namespaces/{namespace}. For example:
3313+ * namespaces/PROJECT_ID
3314+ */
3315+ public ReplaceInstance setName(java.lang.String name) {
3316+ if (!getSuppressPatternChecks()) {
3317+ com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
3318+ "Parameter name must conform to the pattern " +
3319+ "^namespaces/[^/]+/instances/[^/]+$");
3320+ }
3321+ this.name = name;
3322+ return this;
3323+ }
3324+
3325+ @Override
3326+ public ReplaceInstance set(String parameterName, Object value) {
3327+ return (ReplaceInstance) super.set(parameterName, value);
3328+ }
3329+ }
31883330 /**
31893331 * Start an Instance which has been stopped.
31903332 *
0 commit comments