1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/analytics/data/v1alpha/data.proto 18 19 package com.google.analytics.data.v1alpha; 20 21 /** 22 * 23 * 24 * <pre> 25 * A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests 26 * are allowed up to 4 date ranges. 27 * </pre> 28 * 29 * Protobuf type {@code google.analytics.data.v1alpha.DateRange} 30 */ 31 public final class DateRange extends com.google.protobuf.GeneratedMessageV3 32 implements 33 // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.DateRange) 34 DateRangeOrBuilder { 35 private static final long serialVersionUID = 0L; 36 // Use DateRange.newBuilder() to construct. DateRange(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37 private DateRange(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 38 super(builder); 39 } 40 DateRange()41 private DateRange() { 42 startDate_ = ""; 43 endDate_ = ""; 44 name_ = ""; 45 } 46 47 @java.lang.Override 48 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)49 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 50 return new DateRange(); 51 } 52 53 @java.lang.Override getUnknownFields()54 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 55 return this.unknownFields; 56 } 57 getDescriptor()58 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 59 return com.google.analytics.data.v1alpha.ReportingApiProto 60 .internal_static_google_analytics_data_v1alpha_DateRange_descriptor; 61 } 62 63 @java.lang.Override 64 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()65 internalGetFieldAccessorTable() { 66 return com.google.analytics.data.v1alpha.ReportingApiProto 67 .internal_static_google_analytics_data_v1alpha_DateRange_fieldAccessorTable 68 .ensureFieldAccessorsInitialized( 69 com.google.analytics.data.v1alpha.DateRange.class, 70 com.google.analytics.data.v1alpha.DateRange.Builder.class); 71 } 72 73 public static final int START_DATE_FIELD_NUMBER = 1; 74 75 @SuppressWarnings("serial") 76 private volatile java.lang.Object startDate_ = ""; 77 /** 78 * 79 * 80 * <pre> 81 * The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot 82 * be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also 83 * accepted, and in that case, the date is inferred based on the property's 84 * reporting time zone. 85 * </pre> 86 * 87 * <code>string start_date = 1;</code> 88 * 89 * @return The startDate. 90 */ 91 @java.lang.Override getStartDate()92 public java.lang.String getStartDate() { 93 java.lang.Object ref = startDate_; 94 if (ref instanceof java.lang.String) { 95 return (java.lang.String) ref; 96 } else { 97 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 98 java.lang.String s = bs.toStringUtf8(); 99 startDate_ = s; 100 return s; 101 } 102 } 103 /** 104 * 105 * 106 * <pre> 107 * The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot 108 * be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also 109 * accepted, and in that case, the date is inferred based on the property's 110 * reporting time zone. 111 * </pre> 112 * 113 * <code>string start_date = 1;</code> 114 * 115 * @return The bytes for startDate. 116 */ 117 @java.lang.Override getStartDateBytes()118 public com.google.protobuf.ByteString getStartDateBytes() { 119 java.lang.Object ref = startDate_; 120 if (ref instanceof java.lang.String) { 121 com.google.protobuf.ByteString b = 122 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 123 startDate_ = b; 124 return b; 125 } else { 126 return (com.google.protobuf.ByteString) ref; 127 } 128 } 129 130 public static final int END_DATE_FIELD_NUMBER = 2; 131 132 @SuppressWarnings("serial") 133 private volatile java.lang.Object endDate_ = ""; 134 /** 135 * 136 * 137 * <pre> 138 * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot 139 * be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is 140 * also accepted, and in that case, the date is inferred based on the 141 * property's reporting time zone. 142 * </pre> 143 * 144 * <code>string end_date = 2;</code> 145 * 146 * @return The endDate. 147 */ 148 @java.lang.Override getEndDate()149 public java.lang.String getEndDate() { 150 java.lang.Object ref = endDate_; 151 if (ref instanceof java.lang.String) { 152 return (java.lang.String) ref; 153 } else { 154 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 155 java.lang.String s = bs.toStringUtf8(); 156 endDate_ = s; 157 return s; 158 } 159 } 160 /** 161 * 162 * 163 * <pre> 164 * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot 165 * be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is 166 * also accepted, and in that case, the date is inferred based on the 167 * property's reporting time zone. 168 * </pre> 169 * 170 * <code>string end_date = 2;</code> 171 * 172 * @return The bytes for endDate. 173 */ 174 @java.lang.Override getEndDateBytes()175 public com.google.protobuf.ByteString getEndDateBytes() { 176 java.lang.Object ref = endDate_; 177 if (ref instanceof java.lang.String) { 178 com.google.protobuf.ByteString b = 179 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 180 endDate_ = b; 181 return b; 182 } else { 183 return (com.google.protobuf.ByteString) ref; 184 } 185 } 186 187 public static final int NAME_FIELD_NUMBER = 3; 188 189 @SuppressWarnings("serial") 190 private volatile java.lang.Object name_ = ""; 191 /** 192 * 193 * 194 * <pre> 195 * Assigns a name to this date range. The dimension `dateRange` is valued to 196 * this name in a report response. If set, cannot begin with `date_range_` or 197 * `RESERVED_`. If not set, date ranges are named by their zero based index in 198 * the request: `date_range_0`, `date_range_1`, etc. 199 * </pre> 200 * 201 * <code>string name = 3;</code> 202 * 203 * @return The name. 204 */ 205 @java.lang.Override getName()206 public java.lang.String getName() { 207 java.lang.Object ref = name_; 208 if (ref instanceof java.lang.String) { 209 return (java.lang.String) ref; 210 } else { 211 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 212 java.lang.String s = bs.toStringUtf8(); 213 name_ = s; 214 return s; 215 } 216 } 217 /** 218 * 219 * 220 * <pre> 221 * Assigns a name to this date range. The dimension `dateRange` is valued to 222 * this name in a report response. If set, cannot begin with `date_range_` or 223 * `RESERVED_`. If not set, date ranges are named by their zero based index in 224 * the request: `date_range_0`, `date_range_1`, etc. 225 * </pre> 226 * 227 * <code>string name = 3;</code> 228 * 229 * @return The bytes for name. 230 */ 231 @java.lang.Override getNameBytes()232 public com.google.protobuf.ByteString getNameBytes() { 233 java.lang.Object ref = name_; 234 if (ref instanceof java.lang.String) { 235 com.google.protobuf.ByteString b = 236 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 237 name_ = b; 238 return b; 239 } else { 240 return (com.google.protobuf.ByteString) ref; 241 } 242 } 243 244 private byte memoizedIsInitialized = -1; 245 246 @java.lang.Override isInitialized()247 public final boolean isInitialized() { 248 byte isInitialized = memoizedIsInitialized; 249 if (isInitialized == 1) return true; 250 if (isInitialized == 0) return false; 251 252 memoizedIsInitialized = 1; 253 return true; 254 } 255 256 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)257 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 258 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startDate_)) { 259 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, startDate_); 260 } 261 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endDate_)) { 262 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, endDate_); 263 } 264 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 265 com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); 266 } 267 getUnknownFields().writeTo(output); 268 } 269 270 @java.lang.Override getSerializedSize()271 public int getSerializedSize() { 272 int size = memoizedSize; 273 if (size != -1) return size; 274 275 size = 0; 276 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startDate_)) { 277 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, startDate_); 278 } 279 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endDate_)) { 280 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, endDate_); 281 } 282 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 283 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); 284 } 285 size += getUnknownFields().getSerializedSize(); 286 memoizedSize = size; 287 return size; 288 } 289 290 @java.lang.Override equals(final java.lang.Object obj)291 public boolean equals(final java.lang.Object obj) { 292 if (obj == this) { 293 return true; 294 } 295 if (!(obj instanceof com.google.analytics.data.v1alpha.DateRange)) { 296 return super.equals(obj); 297 } 298 com.google.analytics.data.v1alpha.DateRange other = 299 (com.google.analytics.data.v1alpha.DateRange) obj; 300 301 if (!getStartDate().equals(other.getStartDate())) return false; 302 if (!getEndDate().equals(other.getEndDate())) return false; 303 if (!getName().equals(other.getName())) return false; 304 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 305 return true; 306 } 307 308 @java.lang.Override hashCode()309 public int hashCode() { 310 if (memoizedHashCode != 0) { 311 return memoizedHashCode; 312 } 313 int hash = 41; 314 hash = (19 * hash) + getDescriptor().hashCode(); 315 hash = (37 * hash) + START_DATE_FIELD_NUMBER; 316 hash = (53 * hash) + getStartDate().hashCode(); 317 hash = (37 * hash) + END_DATE_FIELD_NUMBER; 318 hash = (53 * hash) + getEndDate().hashCode(); 319 hash = (37 * hash) + NAME_FIELD_NUMBER; 320 hash = (53 * hash) + getName().hashCode(); 321 hash = (29 * hash) + getUnknownFields().hashCode(); 322 memoizedHashCode = hash; 323 return hash; 324 } 325 parseFrom(java.nio.ByteBuffer data)326 public static com.google.analytics.data.v1alpha.DateRange parseFrom(java.nio.ByteBuffer data) 327 throws com.google.protobuf.InvalidProtocolBufferException { 328 return PARSER.parseFrom(data); 329 } 330 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)331 public static com.google.analytics.data.v1alpha.DateRange parseFrom( 332 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 333 throws com.google.protobuf.InvalidProtocolBufferException { 334 return PARSER.parseFrom(data, extensionRegistry); 335 } 336 parseFrom( com.google.protobuf.ByteString data)337 public static com.google.analytics.data.v1alpha.DateRange parseFrom( 338 com.google.protobuf.ByteString data) 339 throws com.google.protobuf.InvalidProtocolBufferException { 340 return PARSER.parseFrom(data); 341 } 342 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)343 public static com.google.analytics.data.v1alpha.DateRange parseFrom( 344 com.google.protobuf.ByteString data, 345 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 346 throws com.google.protobuf.InvalidProtocolBufferException { 347 return PARSER.parseFrom(data, extensionRegistry); 348 } 349 parseFrom(byte[] data)350 public static com.google.analytics.data.v1alpha.DateRange parseFrom(byte[] data) 351 throws com.google.protobuf.InvalidProtocolBufferException { 352 return PARSER.parseFrom(data); 353 } 354 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)355 public static com.google.analytics.data.v1alpha.DateRange parseFrom( 356 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 357 throws com.google.protobuf.InvalidProtocolBufferException { 358 return PARSER.parseFrom(data, extensionRegistry); 359 } 360 parseFrom(java.io.InputStream input)361 public static com.google.analytics.data.v1alpha.DateRange parseFrom(java.io.InputStream input) 362 throws java.io.IOException { 363 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 364 } 365 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)366 public static com.google.analytics.data.v1alpha.DateRange parseFrom( 367 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 368 throws java.io.IOException { 369 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 370 PARSER, input, extensionRegistry); 371 } 372 parseDelimitedFrom( java.io.InputStream input)373 public static com.google.analytics.data.v1alpha.DateRange parseDelimitedFrom( 374 java.io.InputStream input) throws java.io.IOException { 375 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 376 } 377 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)378 public static com.google.analytics.data.v1alpha.DateRange parseDelimitedFrom( 379 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 380 throws java.io.IOException { 381 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 382 PARSER, input, extensionRegistry); 383 } 384 parseFrom( com.google.protobuf.CodedInputStream input)385 public static com.google.analytics.data.v1alpha.DateRange parseFrom( 386 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 387 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 388 } 389 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)390 public static com.google.analytics.data.v1alpha.DateRange parseFrom( 391 com.google.protobuf.CodedInputStream input, 392 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 393 throws java.io.IOException { 394 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 395 PARSER, input, extensionRegistry); 396 } 397 398 @java.lang.Override newBuilderForType()399 public Builder newBuilderForType() { 400 return newBuilder(); 401 } 402 newBuilder()403 public static Builder newBuilder() { 404 return DEFAULT_INSTANCE.toBuilder(); 405 } 406 newBuilder(com.google.analytics.data.v1alpha.DateRange prototype)407 public static Builder newBuilder(com.google.analytics.data.v1alpha.DateRange prototype) { 408 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 409 } 410 411 @java.lang.Override toBuilder()412 public Builder toBuilder() { 413 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 414 } 415 416 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)417 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 418 Builder builder = new Builder(parent); 419 return builder; 420 } 421 /** 422 * 423 * 424 * <pre> 425 * A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests 426 * are allowed up to 4 date ranges. 427 * </pre> 428 * 429 * Protobuf type {@code google.analytics.data.v1alpha.DateRange} 430 */ 431 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 432 implements 433 // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.DateRange) 434 com.google.analytics.data.v1alpha.DateRangeOrBuilder { getDescriptor()435 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 436 return com.google.analytics.data.v1alpha.ReportingApiProto 437 .internal_static_google_analytics_data_v1alpha_DateRange_descriptor; 438 } 439 440 @java.lang.Override 441 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()442 internalGetFieldAccessorTable() { 443 return com.google.analytics.data.v1alpha.ReportingApiProto 444 .internal_static_google_analytics_data_v1alpha_DateRange_fieldAccessorTable 445 .ensureFieldAccessorsInitialized( 446 com.google.analytics.data.v1alpha.DateRange.class, 447 com.google.analytics.data.v1alpha.DateRange.Builder.class); 448 } 449 450 // Construct using com.google.analytics.data.v1alpha.DateRange.newBuilder() Builder()451 private Builder() {} 452 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)453 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 454 super(parent); 455 } 456 457 @java.lang.Override clear()458 public Builder clear() { 459 super.clear(); 460 bitField0_ = 0; 461 startDate_ = ""; 462 endDate_ = ""; 463 name_ = ""; 464 return this; 465 } 466 467 @java.lang.Override getDescriptorForType()468 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 469 return com.google.analytics.data.v1alpha.ReportingApiProto 470 .internal_static_google_analytics_data_v1alpha_DateRange_descriptor; 471 } 472 473 @java.lang.Override getDefaultInstanceForType()474 public com.google.analytics.data.v1alpha.DateRange getDefaultInstanceForType() { 475 return com.google.analytics.data.v1alpha.DateRange.getDefaultInstance(); 476 } 477 478 @java.lang.Override build()479 public com.google.analytics.data.v1alpha.DateRange build() { 480 com.google.analytics.data.v1alpha.DateRange result = buildPartial(); 481 if (!result.isInitialized()) { 482 throw newUninitializedMessageException(result); 483 } 484 return result; 485 } 486 487 @java.lang.Override buildPartial()488 public com.google.analytics.data.v1alpha.DateRange buildPartial() { 489 com.google.analytics.data.v1alpha.DateRange result = 490 new com.google.analytics.data.v1alpha.DateRange(this); 491 if (bitField0_ != 0) { 492 buildPartial0(result); 493 } 494 onBuilt(); 495 return result; 496 } 497 buildPartial0(com.google.analytics.data.v1alpha.DateRange result)498 private void buildPartial0(com.google.analytics.data.v1alpha.DateRange result) { 499 int from_bitField0_ = bitField0_; 500 if (((from_bitField0_ & 0x00000001) != 0)) { 501 result.startDate_ = startDate_; 502 } 503 if (((from_bitField0_ & 0x00000002) != 0)) { 504 result.endDate_ = endDate_; 505 } 506 if (((from_bitField0_ & 0x00000004) != 0)) { 507 result.name_ = name_; 508 } 509 } 510 511 @java.lang.Override clone()512 public Builder clone() { 513 return super.clone(); 514 } 515 516 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)517 public Builder setField( 518 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 519 return super.setField(field, value); 520 } 521 522 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)523 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 524 return super.clearField(field); 525 } 526 527 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)528 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 529 return super.clearOneof(oneof); 530 } 531 532 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)533 public Builder setRepeatedField( 534 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 535 return super.setRepeatedField(field, index, value); 536 } 537 538 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)539 public Builder addRepeatedField( 540 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 541 return super.addRepeatedField(field, value); 542 } 543 544 @java.lang.Override mergeFrom(com.google.protobuf.Message other)545 public Builder mergeFrom(com.google.protobuf.Message other) { 546 if (other instanceof com.google.analytics.data.v1alpha.DateRange) { 547 return mergeFrom((com.google.analytics.data.v1alpha.DateRange) other); 548 } else { 549 super.mergeFrom(other); 550 return this; 551 } 552 } 553 mergeFrom(com.google.analytics.data.v1alpha.DateRange other)554 public Builder mergeFrom(com.google.analytics.data.v1alpha.DateRange other) { 555 if (other == com.google.analytics.data.v1alpha.DateRange.getDefaultInstance()) return this; 556 if (!other.getStartDate().isEmpty()) { 557 startDate_ = other.startDate_; 558 bitField0_ |= 0x00000001; 559 onChanged(); 560 } 561 if (!other.getEndDate().isEmpty()) { 562 endDate_ = other.endDate_; 563 bitField0_ |= 0x00000002; 564 onChanged(); 565 } 566 if (!other.getName().isEmpty()) { 567 name_ = other.name_; 568 bitField0_ |= 0x00000004; 569 onChanged(); 570 } 571 this.mergeUnknownFields(other.getUnknownFields()); 572 onChanged(); 573 return this; 574 } 575 576 @java.lang.Override isInitialized()577 public final boolean isInitialized() { 578 return true; 579 } 580 581 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)582 public Builder mergeFrom( 583 com.google.protobuf.CodedInputStream input, 584 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 585 throws java.io.IOException { 586 if (extensionRegistry == null) { 587 throw new java.lang.NullPointerException(); 588 } 589 try { 590 boolean done = false; 591 while (!done) { 592 int tag = input.readTag(); 593 switch (tag) { 594 case 0: 595 done = true; 596 break; 597 case 10: 598 { 599 startDate_ = input.readStringRequireUtf8(); 600 bitField0_ |= 0x00000001; 601 break; 602 } // case 10 603 case 18: 604 { 605 endDate_ = input.readStringRequireUtf8(); 606 bitField0_ |= 0x00000002; 607 break; 608 } // case 18 609 case 26: 610 { 611 name_ = input.readStringRequireUtf8(); 612 bitField0_ |= 0x00000004; 613 break; 614 } // case 26 615 default: 616 { 617 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 618 done = true; // was an endgroup tag 619 } 620 break; 621 } // default: 622 } // switch (tag) 623 } // while (!done) 624 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 625 throw e.unwrapIOException(); 626 } finally { 627 onChanged(); 628 } // finally 629 return this; 630 } 631 632 private int bitField0_; 633 634 private java.lang.Object startDate_ = ""; 635 /** 636 * 637 * 638 * <pre> 639 * The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot 640 * be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also 641 * accepted, and in that case, the date is inferred based on the property's 642 * reporting time zone. 643 * </pre> 644 * 645 * <code>string start_date = 1;</code> 646 * 647 * @return The startDate. 648 */ getStartDate()649 public java.lang.String getStartDate() { 650 java.lang.Object ref = startDate_; 651 if (!(ref instanceof java.lang.String)) { 652 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 653 java.lang.String s = bs.toStringUtf8(); 654 startDate_ = s; 655 return s; 656 } else { 657 return (java.lang.String) ref; 658 } 659 } 660 /** 661 * 662 * 663 * <pre> 664 * The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot 665 * be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also 666 * accepted, and in that case, the date is inferred based on the property's 667 * reporting time zone. 668 * </pre> 669 * 670 * <code>string start_date = 1;</code> 671 * 672 * @return The bytes for startDate. 673 */ getStartDateBytes()674 public com.google.protobuf.ByteString getStartDateBytes() { 675 java.lang.Object ref = startDate_; 676 if (ref instanceof String) { 677 com.google.protobuf.ByteString b = 678 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 679 startDate_ = b; 680 return b; 681 } else { 682 return (com.google.protobuf.ByteString) ref; 683 } 684 } 685 /** 686 * 687 * 688 * <pre> 689 * The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot 690 * be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also 691 * accepted, and in that case, the date is inferred based on the property's 692 * reporting time zone. 693 * </pre> 694 * 695 * <code>string start_date = 1;</code> 696 * 697 * @param value The startDate to set. 698 * @return This builder for chaining. 699 */ setStartDate(java.lang.String value)700 public Builder setStartDate(java.lang.String value) { 701 if (value == null) { 702 throw new NullPointerException(); 703 } 704 startDate_ = value; 705 bitField0_ |= 0x00000001; 706 onChanged(); 707 return this; 708 } 709 /** 710 * 711 * 712 * <pre> 713 * The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot 714 * be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also 715 * accepted, and in that case, the date is inferred based on the property's 716 * reporting time zone. 717 * </pre> 718 * 719 * <code>string start_date = 1;</code> 720 * 721 * @return This builder for chaining. 722 */ clearStartDate()723 public Builder clearStartDate() { 724 startDate_ = getDefaultInstance().getStartDate(); 725 bitField0_ = (bitField0_ & ~0x00000001); 726 onChanged(); 727 return this; 728 } 729 /** 730 * 731 * 732 * <pre> 733 * The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot 734 * be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also 735 * accepted, and in that case, the date is inferred based on the property's 736 * reporting time zone. 737 * </pre> 738 * 739 * <code>string start_date = 1;</code> 740 * 741 * @param value The bytes for startDate to set. 742 * @return This builder for chaining. 743 */ setStartDateBytes(com.google.protobuf.ByteString value)744 public Builder setStartDateBytes(com.google.protobuf.ByteString value) { 745 if (value == null) { 746 throw new NullPointerException(); 747 } 748 checkByteStringIsUtf8(value); 749 startDate_ = value; 750 bitField0_ |= 0x00000001; 751 onChanged(); 752 return this; 753 } 754 755 private java.lang.Object endDate_ = ""; 756 /** 757 * 758 * 759 * <pre> 760 * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot 761 * be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is 762 * also accepted, and in that case, the date is inferred based on the 763 * property's reporting time zone. 764 * </pre> 765 * 766 * <code>string end_date = 2;</code> 767 * 768 * @return The endDate. 769 */ getEndDate()770 public java.lang.String getEndDate() { 771 java.lang.Object ref = endDate_; 772 if (!(ref instanceof java.lang.String)) { 773 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 774 java.lang.String s = bs.toStringUtf8(); 775 endDate_ = s; 776 return s; 777 } else { 778 return (java.lang.String) ref; 779 } 780 } 781 /** 782 * 783 * 784 * <pre> 785 * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot 786 * be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is 787 * also accepted, and in that case, the date is inferred based on the 788 * property's reporting time zone. 789 * </pre> 790 * 791 * <code>string end_date = 2;</code> 792 * 793 * @return The bytes for endDate. 794 */ getEndDateBytes()795 public com.google.protobuf.ByteString getEndDateBytes() { 796 java.lang.Object ref = endDate_; 797 if (ref instanceof String) { 798 com.google.protobuf.ByteString b = 799 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 800 endDate_ = b; 801 return b; 802 } else { 803 return (com.google.protobuf.ByteString) ref; 804 } 805 } 806 /** 807 * 808 * 809 * <pre> 810 * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot 811 * be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is 812 * also accepted, and in that case, the date is inferred based on the 813 * property's reporting time zone. 814 * </pre> 815 * 816 * <code>string end_date = 2;</code> 817 * 818 * @param value The endDate to set. 819 * @return This builder for chaining. 820 */ setEndDate(java.lang.String value)821 public Builder setEndDate(java.lang.String value) { 822 if (value == null) { 823 throw new NullPointerException(); 824 } 825 endDate_ = value; 826 bitField0_ |= 0x00000002; 827 onChanged(); 828 return this; 829 } 830 /** 831 * 832 * 833 * <pre> 834 * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot 835 * be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is 836 * also accepted, and in that case, the date is inferred based on the 837 * property's reporting time zone. 838 * </pre> 839 * 840 * <code>string end_date = 2;</code> 841 * 842 * @return This builder for chaining. 843 */ clearEndDate()844 public Builder clearEndDate() { 845 endDate_ = getDefaultInstance().getEndDate(); 846 bitField0_ = (bitField0_ & ~0x00000002); 847 onChanged(); 848 return this; 849 } 850 /** 851 * 852 * 853 * <pre> 854 * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot 855 * be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is 856 * also accepted, and in that case, the date is inferred based on the 857 * property's reporting time zone. 858 * </pre> 859 * 860 * <code>string end_date = 2;</code> 861 * 862 * @param value The bytes for endDate to set. 863 * @return This builder for chaining. 864 */ setEndDateBytes(com.google.protobuf.ByteString value)865 public Builder setEndDateBytes(com.google.protobuf.ByteString value) { 866 if (value == null) { 867 throw new NullPointerException(); 868 } 869 checkByteStringIsUtf8(value); 870 endDate_ = value; 871 bitField0_ |= 0x00000002; 872 onChanged(); 873 return this; 874 } 875 876 private java.lang.Object name_ = ""; 877 /** 878 * 879 * 880 * <pre> 881 * Assigns a name to this date range. The dimension `dateRange` is valued to 882 * this name in a report response. If set, cannot begin with `date_range_` or 883 * `RESERVED_`. If not set, date ranges are named by their zero based index in 884 * the request: `date_range_0`, `date_range_1`, etc. 885 * </pre> 886 * 887 * <code>string name = 3;</code> 888 * 889 * @return The name. 890 */ getName()891 public java.lang.String getName() { 892 java.lang.Object ref = name_; 893 if (!(ref instanceof java.lang.String)) { 894 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 895 java.lang.String s = bs.toStringUtf8(); 896 name_ = s; 897 return s; 898 } else { 899 return (java.lang.String) ref; 900 } 901 } 902 /** 903 * 904 * 905 * <pre> 906 * Assigns a name to this date range. The dimension `dateRange` is valued to 907 * this name in a report response. If set, cannot begin with `date_range_` or 908 * `RESERVED_`. If not set, date ranges are named by their zero based index in 909 * the request: `date_range_0`, `date_range_1`, etc. 910 * </pre> 911 * 912 * <code>string name = 3;</code> 913 * 914 * @return The bytes for name. 915 */ getNameBytes()916 public com.google.protobuf.ByteString getNameBytes() { 917 java.lang.Object ref = name_; 918 if (ref instanceof String) { 919 com.google.protobuf.ByteString b = 920 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 921 name_ = b; 922 return b; 923 } else { 924 return (com.google.protobuf.ByteString) ref; 925 } 926 } 927 /** 928 * 929 * 930 * <pre> 931 * Assigns a name to this date range. The dimension `dateRange` is valued to 932 * this name in a report response. If set, cannot begin with `date_range_` or 933 * `RESERVED_`. If not set, date ranges are named by their zero based index in 934 * the request: `date_range_0`, `date_range_1`, etc. 935 * </pre> 936 * 937 * <code>string name = 3;</code> 938 * 939 * @param value The name to set. 940 * @return This builder for chaining. 941 */ setName(java.lang.String value)942 public Builder setName(java.lang.String value) { 943 if (value == null) { 944 throw new NullPointerException(); 945 } 946 name_ = value; 947 bitField0_ |= 0x00000004; 948 onChanged(); 949 return this; 950 } 951 /** 952 * 953 * 954 * <pre> 955 * Assigns a name to this date range. The dimension `dateRange` is valued to 956 * this name in a report response. If set, cannot begin with `date_range_` or 957 * `RESERVED_`. If not set, date ranges are named by their zero based index in 958 * the request: `date_range_0`, `date_range_1`, etc. 959 * </pre> 960 * 961 * <code>string name = 3;</code> 962 * 963 * @return This builder for chaining. 964 */ clearName()965 public Builder clearName() { 966 name_ = getDefaultInstance().getName(); 967 bitField0_ = (bitField0_ & ~0x00000004); 968 onChanged(); 969 return this; 970 } 971 /** 972 * 973 * 974 * <pre> 975 * Assigns a name to this date range. The dimension `dateRange` is valued to 976 * this name in a report response. If set, cannot begin with `date_range_` or 977 * `RESERVED_`. If not set, date ranges are named by their zero based index in 978 * the request: `date_range_0`, `date_range_1`, etc. 979 * </pre> 980 * 981 * <code>string name = 3;</code> 982 * 983 * @param value The bytes for name to set. 984 * @return This builder for chaining. 985 */ setNameBytes(com.google.protobuf.ByteString value)986 public Builder setNameBytes(com.google.protobuf.ByteString value) { 987 if (value == null) { 988 throw new NullPointerException(); 989 } 990 checkByteStringIsUtf8(value); 991 name_ = value; 992 bitField0_ |= 0x00000004; 993 onChanged(); 994 return this; 995 } 996 997 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)998 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 999 return super.setUnknownFields(unknownFields); 1000 } 1001 1002 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1003 public final Builder mergeUnknownFields( 1004 final com.google.protobuf.UnknownFieldSet unknownFields) { 1005 return super.mergeUnknownFields(unknownFields); 1006 } 1007 1008 // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.DateRange) 1009 } 1010 1011 // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.DateRange) 1012 private static final com.google.analytics.data.v1alpha.DateRange DEFAULT_INSTANCE; 1013 1014 static { 1015 DEFAULT_INSTANCE = new com.google.analytics.data.v1alpha.DateRange(); 1016 } 1017 getDefaultInstance()1018 public static com.google.analytics.data.v1alpha.DateRange getDefaultInstance() { 1019 return DEFAULT_INSTANCE; 1020 } 1021 1022 private static final com.google.protobuf.Parser<DateRange> PARSER = 1023 new com.google.protobuf.AbstractParser<DateRange>() { 1024 @java.lang.Override 1025 public DateRange parsePartialFrom( 1026 com.google.protobuf.CodedInputStream input, 1027 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1028 throws com.google.protobuf.InvalidProtocolBufferException { 1029 Builder builder = newBuilder(); 1030 try { 1031 builder.mergeFrom(input, extensionRegistry); 1032 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1033 throw e.setUnfinishedMessage(builder.buildPartial()); 1034 } catch (com.google.protobuf.UninitializedMessageException e) { 1035 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1036 } catch (java.io.IOException e) { 1037 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1038 .setUnfinishedMessage(builder.buildPartial()); 1039 } 1040 return builder.buildPartial(); 1041 } 1042 }; 1043 parser()1044 public static com.google.protobuf.Parser<DateRange> parser() { 1045 return PARSER; 1046 } 1047 1048 @java.lang.Override getParserForType()1049 public com.google.protobuf.Parser<DateRange> getParserForType() { 1050 return PARSER; 1051 } 1052 1053 @java.lang.Override getDefaultInstanceForType()1054 public com.google.analytics.data.v1alpha.DateRange getDefaultInstanceForType() { 1055 return DEFAULT_INSTANCE; 1056 } 1057 } 1058