@@ -64489,6 +64489,246 @@ public RemoveResourcePolicies set(String parameterName, Object value) {
64489
64489
return (RemoveResourcePolicies) super.set(parameterName, value);
64490
64490
}
64491
64491
}
64492
+ /**
64493
+ * Mark the host as faulty and try to restart the instance on a new host.
64494
+ *
64495
+ * Create a request for the method "instances.reportHostAsFaulty".
64496
+ *
64497
+ * This request holds the parameters needed by the compute server. After setting any optional
64498
+ * parameters, call the {@link ReportHostAsFaulty#execute()} method to invoke the remote operation.
64499
+ *
64500
+ * @param project Project ID for this request.
64501
+ * @param zone The name of the zone for this request.
64502
+ * @param instance Name of the instance scoping this request.
64503
+ * @param content the {@link com.google.api.services.compute.model.InstancesReportHostAsFaultyRequest}
64504
+ * @return the request
64505
+ */
64506
+ public ReportHostAsFaulty reportHostAsFaulty(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.InstancesReportHostAsFaultyRequest content) throws java.io.IOException {
64507
+ ReportHostAsFaulty result = new ReportHostAsFaulty(project, zone, instance, content);
64508
+ initialize(result);
64509
+ return result;
64510
+ }
64511
+
64512
+ public class ReportHostAsFaulty extends ComputeRequest<com.google.api.services.compute.model.Operation> {
64513
+
64514
+ private static final String REST_PATH = "projects/{project}/zones/{zone}/instances/{instance}/reportHostAsFaulty";
64515
+
64516
+ private final java.util.regex.Pattern PROJECT_PATTERN =
64517
+ java.util.regex.Pattern.compile("(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))");
64518
+
64519
+ private final java.util.regex.Pattern ZONE_PATTERN =
64520
+ java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?");
64521
+
64522
+ private final java.util.regex.Pattern INSTANCE_PATTERN =
64523
+ java.util.regex.Pattern.compile("[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}");
64524
+
64525
+ /**
64526
+ * Mark the host as faulty and try to restart the instance on a new host.
64527
+ *
64528
+ * Create a request for the method "instances.reportHostAsFaulty".
64529
+ *
64530
+ * This request holds the parameters needed by the the compute server. After setting any optional
64531
+ * parameters, call the {@link ReportHostAsFaulty#execute()} method to invoke the remote
64532
+ * operation. <p> {@link ReportHostAsFaulty#initialize(com.google.api.client.googleapis.services.A
64533
+ * bstractGoogleClientRequest)} must be called to initialize this instance immediately after
64534
+ * invoking the constructor. </p>
64535
+ *
64536
+ * @param project Project ID for this request.
64537
+ * @param zone The name of the zone for this request.
64538
+ * @param instance Name of the instance scoping this request.
64539
+ * @param content the {@link com.google.api.services.compute.model.InstancesReportHostAsFaultyRequest}
64540
+ * @since 1.13
64541
+ */
64542
+ protected ReportHostAsFaulty(java.lang.String project, java.lang.String zone, java.lang.String instance, com.google.api.services.compute.model.InstancesReportHostAsFaultyRequest content) {
64543
+ super(Compute.this, "POST", REST_PATH, content, com.google.api.services.compute.model.Operation.class);
64544
+ this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified.");
64545
+ if (!getSuppressPatternChecks()) {
64546
+ com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(),
64547
+ "Parameter project must conform to the pattern " +
64548
+ "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))");
64549
+ }
64550
+ this.zone = com.google.api.client.util.Preconditions.checkNotNull(zone, "Required parameter zone must be specified.");
64551
+ if (!getSuppressPatternChecks()) {
64552
+ com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(),
64553
+ "Parameter zone must conform to the pattern " +
64554
+ "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?");
64555
+ }
64556
+ this.instance = com.google.api.client.util.Preconditions.checkNotNull(instance, "Required parameter instance must be specified.");
64557
+ if (!getSuppressPatternChecks()) {
64558
+ com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(),
64559
+ "Parameter instance must conform to the pattern " +
64560
+ "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}");
64561
+ }
64562
+ }
64563
+
64564
+ @Override
64565
+ public ReportHostAsFaulty set$Xgafv(java.lang.String $Xgafv) {
64566
+ return (ReportHostAsFaulty) super.set$Xgafv($Xgafv);
64567
+ }
64568
+
64569
+ @Override
64570
+ public ReportHostAsFaulty setAccessToken(java.lang.String accessToken) {
64571
+ return (ReportHostAsFaulty) super.setAccessToken(accessToken);
64572
+ }
64573
+
64574
+ @Override
64575
+ public ReportHostAsFaulty setAlt(java.lang.String alt) {
64576
+ return (ReportHostAsFaulty) super.setAlt(alt);
64577
+ }
64578
+
64579
+ @Override
64580
+ public ReportHostAsFaulty setCallback(java.lang.String callback) {
64581
+ return (ReportHostAsFaulty) super.setCallback(callback);
64582
+ }
64583
+
64584
+ @Override
64585
+ public ReportHostAsFaulty setFields(java.lang.String fields) {
64586
+ return (ReportHostAsFaulty) super.setFields(fields);
64587
+ }
64588
+
64589
+ @Override
64590
+ public ReportHostAsFaulty setKey(java.lang.String key) {
64591
+ return (ReportHostAsFaulty) super.setKey(key);
64592
+ }
64593
+
64594
+ @Override
64595
+ public ReportHostAsFaulty setOauthToken(java.lang.String oauthToken) {
64596
+ return (ReportHostAsFaulty) super.setOauthToken(oauthToken);
64597
+ }
64598
+
64599
+ @Override
64600
+ public ReportHostAsFaulty setPrettyPrint(java.lang.Boolean prettyPrint) {
64601
+ return (ReportHostAsFaulty) super.setPrettyPrint(prettyPrint);
64602
+ }
64603
+
64604
+ @Override
64605
+ public ReportHostAsFaulty setQuotaUser(java.lang.String quotaUser) {
64606
+ return (ReportHostAsFaulty) super.setQuotaUser(quotaUser);
64607
+ }
64608
+
64609
+ @Override
64610
+ public ReportHostAsFaulty setUploadType(java.lang.String uploadType) {
64611
+ return (ReportHostAsFaulty) super.setUploadType(uploadType);
64612
+ }
64613
+
64614
+ @Override
64615
+ public ReportHostAsFaulty setUploadProtocol(java.lang.String uploadProtocol) {
64616
+ return (ReportHostAsFaulty) super.setUploadProtocol(uploadProtocol);
64617
+ }
64618
+
64619
+ @Override
64620
+ public ReportHostAsFaulty setUserIp(java.lang.String userIp) {
64621
+ return (ReportHostAsFaulty) super.setUserIp(userIp);
64622
+ }
64623
+
64624
+ /** Project ID for this request. */
64625
+ @com.google.api.client.util.Key
64626
+ private java.lang.String project;
64627
+
64628
+ /** Project ID for this request.
64629
+ */
64630
+ public java.lang.String getProject() {
64631
+ return project;
64632
+ }
64633
+
64634
+ /** Project ID for this request. */
64635
+ public ReportHostAsFaulty setProject(java.lang.String project) {
64636
+ if (!getSuppressPatternChecks()) {
64637
+ com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(),
64638
+ "Parameter project must conform to the pattern " +
64639
+ "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))");
64640
+ }
64641
+ this.project = project;
64642
+ return this;
64643
+ }
64644
+
64645
+ /** The name of the zone for this request. */
64646
+ @com.google.api.client.util.Key
64647
+ private java.lang.String zone;
64648
+
64649
+ /** The name of the zone for this request.
64650
+ */
64651
+ public java.lang.String getZone() {
64652
+ return zone;
64653
+ }
64654
+
64655
+ /** The name of the zone for this request. */
64656
+ public ReportHostAsFaulty setZone(java.lang.String zone) {
64657
+ if (!getSuppressPatternChecks()) {
64658
+ com.google.api.client.util.Preconditions.checkArgument(ZONE_PATTERN.matcher(zone).matches(),
64659
+ "Parameter zone must conform to the pattern " +
64660
+ "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?");
64661
+ }
64662
+ this.zone = zone;
64663
+ return this;
64664
+ }
64665
+
64666
+ /** Name of the instance scoping this request. */
64667
+ @com.google.api.client.util.Key
64668
+ private java.lang.String instance;
64669
+
64670
+ /** Name of the instance scoping this request.
64671
+ */
64672
+ public java.lang.String getInstance() {
64673
+ return instance;
64674
+ }
64675
+
64676
+ /** Name of the instance scoping this request. */
64677
+ public ReportHostAsFaulty setInstance(java.lang.String instance) {
64678
+ if (!getSuppressPatternChecks()) {
64679
+ com.google.api.client.util.Preconditions.checkArgument(INSTANCE_PATTERN.matcher(instance).matches(),
64680
+ "Parameter instance must conform to the pattern " +
64681
+ "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}");
64682
+ }
64683
+ this.instance = instance;
64684
+ return this;
64685
+ }
64686
+
64687
+ /**
64688
+ * An optional request ID to identify requests. Specify a unique request ID so that if you
64689
+ * must retry your request, the server will know to ignore the request if it has already been
64690
+ * completed. For example, consider a situation where you make an initial request and the
64691
+ * request times out. If you make the request again with the same request ID, the server can
64692
+ * check if original operation with the same request ID was received, and if so, will ignore
64693
+ * the second request. This prevents clients from accidentally creating duplicate commitments.
64694
+ * The request ID must be a valid UUID with the exception that zero UUID is not supported (
64695
+ * 00000000-0000-0000-0000-000000000000).
64696
+ */
64697
+ @com.google.api.client.util.Key
64698
+ private java.lang.String requestId;
64699
+
64700
+ /** An optional request ID to identify requests. Specify a unique request ID so that if you must retry
64701
+ your request, the server will know to ignore the request if it has already been completed. For
64702
+ example, consider a situation where you make an initial request and the request times out. If you
64703
+ make the request again with the same request ID, the server can check if original operation with
64704
+ the same request ID was received, and if so, will ignore the second request. This prevents clients
64705
+ from accidentally creating duplicate commitments. The request ID must be a valid UUID with the
64706
+ exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
64707
+ */
64708
+ public java.lang.String getRequestId() {
64709
+ return requestId;
64710
+ }
64711
+
64712
+ /**
64713
+ * An optional request ID to identify requests. Specify a unique request ID so that if you
64714
+ * must retry your request, the server will know to ignore the request if it has already been
64715
+ * completed. For example, consider a situation where you make an initial request and the
64716
+ * request times out. If you make the request again with the same request ID, the server can
64717
+ * check if original operation with the same request ID was received, and if so, will ignore
64718
+ * the second request. This prevents clients from accidentally creating duplicate commitments.
64719
+ * The request ID must be a valid UUID with the exception that zero UUID is not supported (
64720
+ * 00000000-0000-0000-0000-000000000000).
64721
+ */
64722
+ public ReportHostAsFaulty setRequestId(java.lang.String requestId) {
64723
+ this.requestId = requestId;
64724
+ return this;
64725
+ }
64726
+
64727
+ @Override
64728
+ public ReportHostAsFaulty set(String parameterName, Object value) {
64729
+ return (ReportHostAsFaulty) super.set(parameterName, value);
64730
+ }
64731
+ }
64492
64732
/**
64493
64733
* Performs a reset on the instance. This is a hard reset. The VM does not do a graceful shutdown.
64494
64734
* For more information, see Resetting an instance.
0 commit comments