/** * * * <pre> * HTTP request body. A request body is allowed only if the HTTP * method is POST, PUT, or PATCH. It is an error to set body on a job with an * incompatible [HttpMethod][google.cloud.scheduler.v1beta1.HttpMethod]. * </pre> * * <code>bytes body = 4;</code> */ public Builder setBody(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } body_ = value; onChanged(); return this; } /**
/** * * * <pre> * Required. * The full URI path that the request will be sent to. This string * must begin with either "http://" or "https://". Some examples of * valid values for [uri][google.cloud.scheduler.v1beta1.HttpTarget.uri] are: * `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will * encode some characters for safety and compatibility. The maximum allowed * URL length is 2083 characters after encoding. * </pre> * * <code>string uri = 1;</code> */ public Builder setUriBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); uri_ = value; onChanged(); return this; }
/** * * * <pre> * Required. * The full URI path that the request will be sent to. This string * must begin with either "http://" or "https://". Some examples of * valid values for [uri][google.cloud.scheduler.v1beta1.HttpTarget.uri] are: * `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will * encode some characters for safety and compatibility. The maximum allowed * URL length is 2083 characters after encoding. * </pre> * * <code>string uri = 1;</code> */ public Builder setUri(java.lang.String value) { if (value == null) { throw new NullPointerException(); } uri_ = value; onChanged(); return this; } /**
/** * * * <pre> * Required. * The full URI path that the request will be sent to. This string * must begin with either "http://" or "https://". Some examples of * valid values for [uri][google.cloud.scheduler.v1beta1.HttpTarget.uri] are: * `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will * encode some characters for safety and compatibility. The maximum allowed * URL length is 2083 characters after encoding. * </pre> * * <code>string uri = 1;</code> */ public Builder clearUri() { uri_ = getDefaultInstance().getUri(); onChanged(); return this; } /**
/** * * * <pre> * Which HTTP method to use for the request. * </pre> * * <code>.google.cloud.scheduler.v1beta1.HttpMethod http_method = 2;</code> */ public Builder setHttpMethod(com.google.cloud.scheduler.v1beta1.HttpMethod value) { if (value == null) { throw new NullPointerException(); } httpMethod_ = value.getNumber(); onChanged(); return this; } /**
public Builder mergeFrom(com.google.cloud.scheduler.v1beta1.HttpTarget other) { if (other == com.google.cloud.scheduler.v1beta1.HttpTarget.getDefaultInstance()) return this; if (!other.getUri().isEmpty()) { uri_ = other.uri_; onChanged(); } if (other.httpMethod_ != 0) { setHttpMethodValue(other.getHttpMethodValue()); } internalGetMutableHeaders().mergeFrom(other.internalGetHeaders()); if (other.getBody() != com.google.protobuf.ByteString.EMPTY) { setBody(other.getBody()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * * * <pre> * HTTP request body. A request body is allowed only if the HTTP * method is POST, PUT, or PATCH. It is an error to set body on a job with an * incompatible [HttpMethod][google.cloud.scheduler.v1beta1.HttpMethod]. * </pre> * * <code>bytes body = 4;</code> */ public Builder clearBody() { body_ = getDefaultInstance().getBody(); onChanged(); return this; }
/** * * * <pre> * Which HTTP method to use for the request. * </pre> * * <code>.google.cloud.scheduler.v1beta1.HttpMethod http_method = 2;</code> */ public Builder setHttpMethodValue(int value) { httpMethod_ = value; onChanged(); return this; } /**
/** * * * <pre> * Which HTTP method to use for the request. * </pre> * * <code>.google.cloud.scheduler.v1beta1.HttpMethod http_method = 2;</code> */ public Builder clearHttpMethod() { httpMethod_ = 0; onChanged(); return this; }
private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableHeaders() { onChanged(); ; if (headers_ == null) { headers_ = com.google.protobuf.MapField.newMapField(HeadersDefaultEntryHolder.defaultEntry); } if (!headers_.isMutable()) { headers_ = headers_.copy(); } return headers_; }