@SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 3: return internalGetHeaders(); default: throw new RuntimeException("Invalid map field number: " + number); } }
throw new java.lang.NullPointerException(); java.util.Map<java.lang.String, java.lang.String> map = internalGetHeaders().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException();
throw new java.lang.NullPointerException(); java.util.Map<java.lang.String, java.lang.String> map = internalGetHeaders().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue;
/** * * * <pre> * The user can specify HTTP request headers to send with the job's * HTTP request. This map contains the header field names and * values. Repeated headers are not supported, but a header value can * contain commas. These headers represent a subset of the headers * that will accompany the job's HTTP request. Some HTTP request * headers will be ignored or replaced. A partial list of headers that * will be ignored or replaced is below: * - Host: This will be computed by Cloud Scheduler and derived from * [uri][google.cloud.scheduler.v1beta1.HttpTarget.uri]. * * `Content-Length`: This will be computed by Cloud Scheduler. * * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. * * `X-Google-*`: Google internal use only. * * `X-AppEngine-*`: Google internal use only. * The total size of headers must be less than 80KB. * </pre> * * <code>map<string, string> headers = 3;</code> */ public boolean containsHeaders(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetHeaders().getMap().containsKey(key); } /** Use {@link #getHeadersMap()} instead. */
/** * * * <pre> * The user can specify HTTP request headers to send with the job's * HTTP request. This map contains the header field names and * values. Repeated headers are not supported, but a header value can * contain commas. These headers represent a subset of the headers * that will accompany the job's HTTP request. Some HTTP request * headers will be ignored or replaced. A partial list of headers that * will be ignored or replaced is below: * - Host: This will be computed by Cloud Scheduler and derived from * [uri][google.cloud.scheduler.v1beta1.HttpTarget.uri]. * * `Content-Length`: This will be computed by Cloud Scheduler. * * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. * * `X-Google-*`: Google internal use only. * * `X-AppEngine-*`: Google internal use only. * The total size of headers must be less than 80KB. * </pre> * * <code>map<string, string> headers = 3;</code> */ public java.util.Map<java.lang.String, java.lang.String> getHeadersMap() { return internalGetHeaders().getMap(); } /**
@java.lang.Override public com.google.cloud.scheduler.v1beta1.HttpTarget buildPartial() { com.google.cloud.scheduler.v1beta1.HttpTarget result = new com.google.cloud.scheduler.v1beta1.HttpTarget(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.uri_ = uri_; result.httpMethod_ = httpMethod_; result.headers_ = internalGetHeaders(); result.headers_.makeImmutable(); result.body_ = body_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public int getHeadersCount() { return internalGetHeaders().getMap().size(); } /**