1// Copyright 2021 Google LLC. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// Code generated file. DO NOT EDIT. 6 7// Package analyticsadmin provides access to the Google Analytics Admin API. 8// 9// For product documentation, see: http://code.google.com/apis/analytics/docs/mgmt/home.html 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/analyticsadmin/v1alpha" 16// ... 17// ctx := context.Background() 18// analyticsadminService, err := analyticsadmin.NewService(ctx) 19// 20// In this example, Google Application Default Credentials are used for authentication. 21// 22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 23// 24// Other authentication options 25// 26// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: 27// 28// analyticsadminService, err := analyticsadmin.NewService(ctx, option.WithScopes(analyticsadmin.AnalyticsReadonlyScope)) 29// 30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 31// 32// analyticsadminService, err := analyticsadmin.NewService(ctx, option.WithAPIKey("AIza...")) 33// 34// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: 35// 36// config := &oauth2.Config{...} 37// // ... 38// token, err := config.Exchange(ctx, ...) 39// analyticsadminService, err := analyticsadmin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 40// 41// See https://godoc.org/google.golang.org/api/option/ for details on options. 42package analyticsadmin // import "google.golang.org/api/analyticsadmin/v1alpha" 43 44import ( 45 "bytes" 46 "context" 47 "encoding/json" 48 "errors" 49 "fmt" 50 "io" 51 "net/http" 52 "net/url" 53 "strconv" 54 "strings" 55 56 googleapi "google.golang.org/api/googleapi" 57 gensupport "google.golang.org/api/internal/gensupport" 58 option "google.golang.org/api/option" 59 internaloption "google.golang.org/api/option/internaloption" 60 htransport "google.golang.org/api/transport/http" 61) 62 63// Always reference these packages, just in case the auto-generated code 64// below doesn't. 65var _ = bytes.NewBuffer 66var _ = strconv.Itoa 67var _ = fmt.Sprintf 68var _ = json.NewDecoder 69var _ = io.Copy 70var _ = url.Parse 71var _ = gensupport.MarshalJSON 72var _ = googleapi.Version 73var _ = errors.New 74var _ = strings.Replace 75var _ = context.Canceled 76var _ = internaloption.WithDefaultEndpoint 77 78const apiId = "analyticsadmin:v1alpha" 79const apiName = "analyticsadmin" 80const apiVersion = "v1alpha" 81const basePath = "https://analyticsadmin.googleapis.com/" 82const mtlsBasePath = "https://analyticsadmin.mtls.googleapis.com/" 83 84// OAuth2 scopes used by this API. 85const ( 86 // Edit Google Analytics management entities 87 AnalyticsEditScope = "https://www.googleapis.com/auth/analytics.edit" 88 89 // Manage Google Analytics Account users by email address 90 AnalyticsManageUsersScope = "https://www.googleapis.com/auth/analytics.manage.users" 91 92 // View Google Analytics user permissions 93 AnalyticsManageUsersReadonlyScope = "https://www.googleapis.com/auth/analytics.manage.users.readonly" 94 95 // See and download your Google Analytics data 96 AnalyticsReadonlyScope = "https://www.googleapis.com/auth/analytics.readonly" 97) 98 99// NewService creates a new Service. 100func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 101 scopesOption := option.WithScopes( 102 "https://www.googleapis.com/auth/analytics.edit", 103 "https://www.googleapis.com/auth/analytics.manage.users", 104 "https://www.googleapis.com/auth/analytics.manage.users.readonly", 105 "https://www.googleapis.com/auth/analytics.readonly", 106 ) 107 // NOTE: prepend, so we don't override user-specified scopes. 108 opts = append([]option.ClientOption{scopesOption}, opts...) 109 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 110 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 111 client, endpoint, err := htransport.NewClient(ctx, opts...) 112 if err != nil { 113 return nil, err 114 } 115 s, err := New(client) 116 if err != nil { 117 return nil, err 118 } 119 if endpoint != "" { 120 s.BasePath = endpoint 121 } 122 return s, nil 123} 124 125// New creates a new Service. It uses the provided http.Client for requests. 126// 127// Deprecated: please use NewService instead. 128// To provide a custom HTTP client, use option.WithHTTPClient. 129// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 130func New(client *http.Client) (*Service, error) { 131 if client == nil { 132 return nil, errors.New("client is nil") 133 } 134 s := &Service{client: client, BasePath: basePath} 135 s.AccountSummaries = NewAccountSummariesService(s) 136 s.Accounts = NewAccountsService(s) 137 s.Properties = NewPropertiesService(s) 138 return s, nil 139} 140 141type Service struct { 142 client *http.Client 143 BasePath string // API endpoint base URL 144 UserAgent string // optional additional User-Agent fragment 145 146 AccountSummaries *AccountSummariesService 147 148 Accounts *AccountsService 149 150 Properties *PropertiesService 151} 152 153func (s *Service) userAgent() string { 154 if s.UserAgent == "" { 155 return googleapi.UserAgent 156 } 157 return googleapi.UserAgent + " " + s.UserAgent 158} 159 160func NewAccountSummariesService(s *Service) *AccountSummariesService { 161 rs := &AccountSummariesService{s: s} 162 return rs 163} 164 165type AccountSummariesService struct { 166 s *Service 167} 168 169func NewAccountsService(s *Service) *AccountsService { 170 rs := &AccountsService{s: s} 171 rs.UserLinks = NewAccountsUserLinksService(s) 172 return rs 173} 174 175type AccountsService struct { 176 s *Service 177 178 UserLinks *AccountsUserLinksService 179} 180 181func NewAccountsUserLinksService(s *Service) *AccountsUserLinksService { 182 rs := &AccountsUserLinksService{s: s} 183 return rs 184} 185 186type AccountsUserLinksService struct { 187 s *Service 188} 189 190func NewPropertiesService(s *Service) *PropertiesService { 191 rs := &PropertiesService{s: s} 192 rs.AndroidAppDataStreams = NewPropertiesAndroidAppDataStreamsService(s) 193 rs.ConversionEvents = NewPropertiesConversionEventsService(s) 194 rs.CustomDimensions = NewPropertiesCustomDimensionsService(s) 195 rs.CustomMetrics = NewPropertiesCustomMetricsService(s) 196 rs.FirebaseLinks = NewPropertiesFirebaseLinksService(s) 197 rs.GoogleAdsLinks = NewPropertiesGoogleAdsLinksService(s) 198 rs.IosAppDataStreams = NewPropertiesIosAppDataStreamsService(s) 199 rs.UserLinks = NewPropertiesUserLinksService(s) 200 rs.WebDataStreams = NewPropertiesWebDataStreamsService(s) 201 return rs 202} 203 204type PropertiesService struct { 205 s *Service 206 207 AndroidAppDataStreams *PropertiesAndroidAppDataStreamsService 208 209 ConversionEvents *PropertiesConversionEventsService 210 211 CustomDimensions *PropertiesCustomDimensionsService 212 213 CustomMetrics *PropertiesCustomMetricsService 214 215 FirebaseLinks *PropertiesFirebaseLinksService 216 217 GoogleAdsLinks *PropertiesGoogleAdsLinksService 218 219 IosAppDataStreams *PropertiesIosAppDataStreamsService 220 221 UserLinks *PropertiesUserLinksService 222 223 WebDataStreams *PropertiesWebDataStreamsService 224} 225 226func NewPropertiesAndroidAppDataStreamsService(s *Service) *PropertiesAndroidAppDataStreamsService { 227 rs := &PropertiesAndroidAppDataStreamsService{s: s} 228 rs.MeasurementProtocolSecrets = NewPropertiesAndroidAppDataStreamsMeasurementProtocolSecretsService(s) 229 return rs 230} 231 232type PropertiesAndroidAppDataStreamsService struct { 233 s *Service 234 235 MeasurementProtocolSecrets *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsService 236} 237 238func NewPropertiesAndroidAppDataStreamsMeasurementProtocolSecretsService(s *Service) *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsService { 239 rs := &PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsService{s: s} 240 return rs 241} 242 243type PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsService struct { 244 s *Service 245} 246 247func NewPropertiesConversionEventsService(s *Service) *PropertiesConversionEventsService { 248 rs := &PropertiesConversionEventsService{s: s} 249 return rs 250} 251 252type PropertiesConversionEventsService struct { 253 s *Service 254} 255 256func NewPropertiesCustomDimensionsService(s *Service) *PropertiesCustomDimensionsService { 257 rs := &PropertiesCustomDimensionsService{s: s} 258 return rs 259} 260 261type PropertiesCustomDimensionsService struct { 262 s *Service 263} 264 265func NewPropertiesCustomMetricsService(s *Service) *PropertiesCustomMetricsService { 266 rs := &PropertiesCustomMetricsService{s: s} 267 return rs 268} 269 270type PropertiesCustomMetricsService struct { 271 s *Service 272} 273 274func NewPropertiesFirebaseLinksService(s *Service) *PropertiesFirebaseLinksService { 275 rs := &PropertiesFirebaseLinksService{s: s} 276 return rs 277} 278 279type PropertiesFirebaseLinksService struct { 280 s *Service 281} 282 283func NewPropertiesGoogleAdsLinksService(s *Service) *PropertiesGoogleAdsLinksService { 284 rs := &PropertiesGoogleAdsLinksService{s: s} 285 return rs 286} 287 288type PropertiesGoogleAdsLinksService struct { 289 s *Service 290} 291 292func NewPropertiesIosAppDataStreamsService(s *Service) *PropertiesIosAppDataStreamsService { 293 rs := &PropertiesIosAppDataStreamsService{s: s} 294 rs.MeasurementProtocolSecrets = NewPropertiesIosAppDataStreamsMeasurementProtocolSecretsService(s) 295 return rs 296} 297 298type PropertiesIosAppDataStreamsService struct { 299 s *Service 300 301 MeasurementProtocolSecrets *PropertiesIosAppDataStreamsMeasurementProtocolSecretsService 302} 303 304func NewPropertiesIosAppDataStreamsMeasurementProtocolSecretsService(s *Service) *PropertiesIosAppDataStreamsMeasurementProtocolSecretsService { 305 rs := &PropertiesIosAppDataStreamsMeasurementProtocolSecretsService{s: s} 306 return rs 307} 308 309type PropertiesIosAppDataStreamsMeasurementProtocolSecretsService struct { 310 s *Service 311} 312 313func NewPropertiesUserLinksService(s *Service) *PropertiesUserLinksService { 314 rs := &PropertiesUserLinksService{s: s} 315 return rs 316} 317 318type PropertiesUserLinksService struct { 319 s *Service 320} 321 322func NewPropertiesWebDataStreamsService(s *Service) *PropertiesWebDataStreamsService { 323 rs := &PropertiesWebDataStreamsService{s: s} 324 rs.MeasurementProtocolSecrets = NewPropertiesWebDataStreamsMeasurementProtocolSecretsService(s) 325 return rs 326} 327 328type PropertiesWebDataStreamsService struct { 329 s *Service 330 331 MeasurementProtocolSecrets *PropertiesWebDataStreamsMeasurementProtocolSecretsService 332} 333 334func NewPropertiesWebDataStreamsMeasurementProtocolSecretsService(s *Service) *PropertiesWebDataStreamsMeasurementProtocolSecretsService { 335 rs := &PropertiesWebDataStreamsMeasurementProtocolSecretsService{s: s} 336 return rs 337} 338 339type PropertiesWebDataStreamsMeasurementProtocolSecretsService struct { 340 s *Service 341} 342 343// GoogleAnalyticsAdminV1alphaAccount: A resource message representing a 344// Google Analytics account. 345type GoogleAnalyticsAdminV1alphaAccount struct { 346 // CreateTime: Output only. Time when this account was originally 347 // created. 348 CreateTime string `json:"createTime,omitempty"` 349 350 // Deleted: Output only. Indicates whether this Account is soft-deleted 351 // or not. Deleted accounts are excluded from List results unless 352 // specifically requested. 353 Deleted bool `json:"deleted,omitempty"` 354 355 // DisplayName: Required. Human-readable display name for this account. 356 DisplayName string `json:"displayName,omitempty"` 357 358 // Name: Output only. Resource name of this account. Format: 359 // accounts/{account} Example: "accounts/100" 360 Name string `json:"name,omitempty"` 361 362 // RegionCode: Country of business. Must be a Unicode CLDR region code. 363 RegionCode string `json:"regionCode,omitempty"` 364 365 // UpdateTime: Output only. Time when account payload fields were last 366 // updated. 367 UpdateTime string `json:"updateTime,omitempty"` 368 369 // ServerResponse contains the HTTP response code and headers from the 370 // server. 371 googleapi.ServerResponse `json:"-"` 372 373 // ForceSendFields is a list of field names (e.g. "CreateTime") to 374 // unconditionally include in API requests. By default, fields with 375 // empty values are omitted from API requests. However, any non-pointer, 376 // non-interface field appearing in ForceSendFields will be sent to the 377 // server regardless of whether the field is empty or not. This may be 378 // used to include empty fields in Patch requests. 379 ForceSendFields []string `json:"-"` 380 381 // NullFields is a list of field names (e.g. "CreateTime") to include in 382 // API requests with the JSON null value. By default, fields with empty 383 // values are omitted from API requests. However, any field with an 384 // empty value appearing in NullFields will be sent to the server as 385 // null. It is an error if a field in this list has a non-empty value. 386 // This may be used to include null fields in Patch requests. 387 NullFields []string `json:"-"` 388} 389 390func (s *GoogleAnalyticsAdminV1alphaAccount) MarshalJSON() ([]byte, error) { 391 type NoMethod GoogleAnalyticsAdminV1alphaAccount 392 raw := NoMethod(*s) 393 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 394} 395 396// GoogleAnalyticsAdminV1alphaAccountSummary: A virtual resource 397// representing an overview of an account and all its child GA4 398// properties. 399type GoogleAnalyticsAdminV1alphaAccountSummary struct { 400 // Account: Resource name of account referred to by this account summary 401 // Format: accounts/{account_id} Example: "accounts/1000" 402 Account string `json:"account,omitempty"` 403 404 // DisplayName: Display name for the account referred to in this account 405 // summary. 406 DisplayName string `json:"displayName,omitempty"` 407 408 // Name: Resource name for this account summary. Format: 409 // accountSummaries/{account_id} Example: "accountSummaries/1000" 410 Name string `json:"name,omitempty"` 411 412 // PropertySummaries: List of summaries for child accounts of this 413 // account. 414 PropertySummaries []*GoogleAnalyticsAdminV1alphaPropertySummary `json:"propertySummaries,omitempty"` 415 416 // ForceSendFields is a list of field names (e.g. "Account") to 417 // unconditionally include in API requests. By default, fields with 418 // empty values are omitted from API requests. However, any non-pointer, 419 // non-interface field appearing in ForceSendFields will be sent to the 420 // server regardless of whether the field is empty or not. This may be 421 // used to include empty fields in Patch requests. 422 ForceSendFields []string `json:"-"` 423 424 // NullFields is a list of field names (e.g. "Account") to include in 425 // API requests with the JSON null value. By default, fields with empty 426 // values are omitted from API requests. However, any field with an 427 // empty value appearing in NullFields will be sent to the server as 428 // null. It is an error if a field in this list has a non-empty value. 429 // This may be used to include null fields in Patch requests. 430 NullFields []string `json:"-"` 431} 432 433func (s *GoogleAnalyticsAdminV1alphaAccountSummary) MarshalJSON() ([]byte, error) { 434 type NoMethod GoogleAnalyticsAdminV1alphaAccountSummary 435 raw := NoMethod(*s) 436 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 437} 438 439// GoogleAnalyticsAdminV1alphaAndroidAppDataStream: A resource message 440// representing a Google Analytics Android app stream. 441type GoogleAnalyticsAdminV1alphaAndroidAppDataStream struct { 442 // CreateTime: Output only. Time when this stream was originally 443 // created. 444 CreateTime string `json:"createTime,omitempty"` 445 446 // DisplayName: Human-readable display name for the Data Stream. The max 447 // allowed display name length is 255 UTF-16 code units. 448 DisplayName string `json:"displayName,omitempty"` 449 450 // FirebaseAppId: Output only. ID of the corresponding Android app in 451 // Firebase, if any. This ID can change if the Android app is deleted 452 // and recreated. 453 FirebaseAppId string `json:"firebaseAppId,omitempty"` 454 455 // Name: Output only. Resource name of this Data Stream. Format: 456 // properties/{property_id}/androidAppDataStreams/{stream_id} Example: 457 // "properties/1000/androidAppDataStreams/2000" 458 Name string `json:"name,omitempty"` 459 460 // PackageName: Immutable. The package name for the app being measured. 461 // Example: "com.example.myandroidapp" 462 PackageName string `json:"packageName,omitempty"` 463 464 // UpdateTime: Output only. Time when stream payload fields were last 465 // updated. 466 UpdateTime string `json:"updateTime,omitempty"` 467 468 // ServerResponse contains the HTTP response code and headers from the 469 // server. 470 googleapi.ServerResponse `json:"-"` 471 472 // ForceSendFields is a list of field names (e.g. "CreateTime") to 473 // unconditionally include in API requests. By default, fields with 474 // empty values are omitted from API requests. However, any non-pointer, 475 // non-interface field appearing in ForceSendFields will be sent to the 476 // server regardless of whether the field is empty or not. This may be 477 // used to include empty fields in Patch requests. 478 ForceSendFields []string `json:"-"` 479 480 // NullFields is a list of field names (e.g. "CreateTime") to include in 481 // API requests with the JSON null value. By default, fields with empty 482 // values are omitted from API requests. However, any field with an 483 // empty value appearing in NullFields will be sent to the server as 484 // null. It is an error if a field in this list has a non-empty value. 485 // This may be used to include null fields in Patch requests. 486 NullFields []string `json:"-"` 487} 488 489func (s *GoogleAnalyticsAdminV1alphaAndroidAppDataStream) MarshalJSON() ([]byte, error) { 490 type NoMethod GoogleAnalyticsAdminV1alphaAndroidAppDataStream 491 raw := NoMethod(*s) 492 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 493} 494 495// GoogleAnalyticsAdminV1alphaArchiveCustomDimensionRequest: Request 496// message for ArchiveCustomDimension RPC. 497type GoogleAnalyticsAdminV1alphaArchiveCustomDimensionRequest struct { 498} 499 500// GoogleAnalyticsAdminV1alphaArchiveCustomMetricRequest: Request 501// message for ArchiveCustomMetric RPC. 502type GoogleAnalyticsAdminV1alphaArchiveCustomMetricRequest struct { 503} 504 505// GoogleAnalyticsAdminV1alphaAuditUserLink: Read-only resource used to 506// summarize a principal's effective roles. 507type GoogleAnalyticsAdminV1alphaAuditUserLink struct { 508 // DirectRoles: Roles directly assigned to this user for this entity. 509 // Format: predefinedRoles/read Excludes roles that are inherited from 510 // an account (if this is for a property), group, or organization admin 511 // role. 512 DirectRoles []string `json:"directRoles,omitempty"` 513 514 // EffectiveRoles: Union of all permissions a user has at this account 515 // or property (includes direct permissions, group-inherited 516 // permissions, etc.). Format: predefinedRoles/read 517 EffectiveRoles []string `json:"effectiveRoles,omitempty"` 518 519 // EmailAddress: Email address of the linked user 520 EmailAddress string `json:"emailAddress,omitempty"` 521 522 // Name: Example format: properties/1234/userLinks/5678 523 Name string `json:"name,omitempty"` 524 525 // ForceSendFields is a list of field names (e.g. "DirectRoles") to 526 // unconditionally include in API requests. By default, fields with 527 // empty values are omitted from API requests. However, any non-pointer, 528 // non-interface field appearing in ForceSendFields will be sent to the 529 // server regardless of whether the field is empty or not. This may be 530 // used to include empty fields in Patch requests. 531 ForceSendFields []string `json:"-"` 532 533 // NullFields is a list of field names (e.g. "DirectRoles") to include 534 // in API requests with the JSON null value. By default, fields with 535 // empty values are omitted from API requests. However, any field with 536 // an empty value appearing in NullFields will be sent to the server as 537 // null. It is an error if a field in this list has a non-empty value. 538 // This may be used to include null fields in Patch requests. 539 NullFields []string `json:"-"` 540} 541 542func (s *GoogleAnalyticsAdminV1alphaAuditUserLink) MarshalJSON() ([]byte, error) { 543 type NoMethod GoogleAnalyticsAdminV1alphaAuditUserLink 544 raw := NoMethod(*s) 545 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 546} 547 548// GoogleAnalyticsAdminV1alphaAuditUserLinksRequest: Request message for 549// AuditUserLinks RPC. 550type GoogleAnalyticsAdminV1alphaAuditUserLinksRequest struct { 551 // PageSize: The maximum number of user links to return. The service may 552 // return fewer than this value. If unspecified, at most 1000 user links 553 // will be returned. The maximum value is 5000; values above 5000 will 554 // be coerced to 5000. 555 PageSize int64 `json:"pageSize,omitempty"` 556 557 // PageToken: A page token, received from a previous `AuditUserLinks` 558 // call. Provide this to retrieve the subsequent page. When paginating, 559 // all other parameters provided to `AuditUserLinks` must match the call 560 // that provided the page token. 561 PageToken string `json:"pageToken,omitempty"` 562 563 // ForceSendFields is a list of field names (e.g. "PageSize") to 564 // unconditionally include in API requests. By default, fields with 565 // empty values are omitted from API requests. However, any non-pointer, 566 // non-interface field appearing in ForceSendFields will be sent to the 567 // server regardless of whether the field is empty or not. This may be 568 // used to include empty fields in Patch requests. 569 ForceSendFields []string `json:"-"` 570 571 // NullFields is a list of field names (e.g. "PageSize") to include in 572 // API requests with the JSON null value. By default, fields with empty 573 // values are omitted from API requests. However, any field with an 574 // empty value appearing in NullFields will be sent to the server as 575 // null. It is an error if a field in this list has a non-empty value. 576 // This may be used to include null fields in Patch requests. 577 NullFields []string `json:"-"` 578} 579 580func (s *GoogleAnalyticsAdminV1alphaAuditUserLinksRequest) MarshalJSON() ([]byte, error) { 581 type NoMethod GoogleAnalyticsAdminV1alphaAuditUserLinksRequest 582 raw := NoMethod(*s) 583 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 584} 585 586// GoogleAnalyticsAdminV1alphaAuditUserLinksResponse: Response message 587// for AuditUserLinks RPC. 588type GoogleAnalyticsAdminV1alphaAuditUserLinksResponse struct { 589 // NextPageToken: A token, which can be sent as `page_token` to retrieve 590 // the next page. If this field is omitted, there are no subsequent 591 // pages. 592 NextPageToken string `json:"nextPageToken,omitempty"` 593 594 // UserLinks: List of AuditUserLinks. These will be ordered stably, but 595 // in an arbitrary order. 596 UserLinks []*GoogleAnalyticsAdminV1alphaAuditUserLink `json:"userLinks,omitempty"` 597 598 // ServerResponse contains the HTTP response code and headers from the 599 // server. 600 googleapi.ServerResponse `json:"-"` 601 602 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 603 // unconditionally include in API requests. By default, fields with 604 // empty values are omitted from API requests. However, any non-pointer, 605 // non-interface field appearing in ForceSendFields will be sent to the 606 // server regardless of whether the field is empty or not. This may be 607 // used to include empty fields in Patch requests. 608 ForceSendFields []string `json:"-"` 609 610 // NullFields is a list of field names (e.g. "NextPageToken") to include 611 // in API requests with the JSON null value. By default, fields with 612 // empty values are omitted from API requests. However, any field with 613 // an empty value appearing in NullFields will be sent to the server as 614 // null. It is an error if a field in this list has a non-empty value. 615 // This may be used to include null fields in Patch requests. 616 NullFields []string `json:"-"` 617} 618 619func (s *GoogleAnalyticsAdminV1alphaAuditUserLinksResponse) MarshalJSON() ([]byte, error) { 620 type NoMethod GoogleAnalyticsAdminV1alphaAuditUserLinksResponse 621 raw := NoMethod(*s) 622 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 623} 624 625// GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest: Request 626// message for BatchCreateUserLinks RPC. 627type GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest struct { 628 // NotifyNewUsers: Optional. If set, then email the new users notifying 629 // them that they've been granted permissions to the resource. 630 // Regardless of whether this is set or not, notify_new_user field 631 // inside each individual request is ignored. 632 NotifyNewUsers bool `json:"notifyNewUsers,omitempty"` 633 634 // Requests: Required. The requests specifying the user links to create. 635 // A maximum of 1000 user links can be created in a batch. 636 Requests []*GoogleAnalyticsAdminV1alphaCreateUserLinkRequest `json:"requests,omitempty"` 637 638 // ForceSendFields is a list of field names (e.g. "NotifyNewUsers") to 639 // unconditionally include in API requests. By default, fields with 640 // empty values are omitted from API requests. However, any non-pointer, 641 // non-interface field appearing in ForceSendFields will be sent to the 642 // server regardless of whether the field is empty or not. This may be 643 // used to include empty fields in Patch requests. 644 ForceSendFields []string `json:"-"` 645 646 // NullFields is a list of field names (e.g. "NotifyNewUsers") to 647 // include in API requests with the JSON null value. By default, fields 648 // with empty values are omitted from API requests. However, any field 649 // with an empty value appearing in NullFields will be sent to the 650 // server as null. It is an error if a field in this list has a 651 // non-empty value. This may be used to include null fields in Patch 652 // requests. 653 NullFields []string `json:"-"` 654} 655 656func (s *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest) MarshalJSON() ([]byte, error) { 657 type NoMethod GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest 658 raw := NoMethod(*s) 659 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 660} 661 662// GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse: Response 663// message for BatchCreateUserLinks RPC. 664type GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse struct { 665 // UserLinks: The user links created. 666 UserLinks []*GoogleAnalyticsAdminV1alphaUserLink `json:"userLinks,omitempty"` 667 668 // ServerResponse contains the HTTP response code and headers from the 669 // server. 670 googleapi.ServerResponse `json:"-"` 671 672 // ForceSendFields is a list of field names (e.g. "UserLinks") to 673 // unconditionally include in API requests. By default, fields with 674 // empty values are omitted from API requests. However, any non-pointer, 675 // non-interface field appearing in ForceSendFields will be sent to the 676 // server regardless of whether the field is empty or not. This may be 677 // used to include empty fields in Patch requests. 678 ForceSendFields []string `json:"-"` 679 680 // NullFields is a list of field names (e.g. "UserLinks") to include in 681 // API requests with the JSON null value. By default, fields with empty 682 // values are omitted from API requests. However, any field with an 683 // empty value appearing in NullFields will be sent to the server as 684 // null. It is an error if a field in this list has a non-empty value. 685 // This may be used to include null fields in Patch requests. 686 NullFields []string `json:"-"` 687} 688 689func (s *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse) MarshalJSON() ([]byte, error) { 690 type NoMethod GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse 691 raw := NoMethod(*s) 692 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 693} 694 695// GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest: Request 696// message for BatchDeleteUserLinks RPC. 697type GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest struct { 698 // Requests: Required. The requests specifying the user links to update. 699 // A maximum of 1000 user links can be updated in a batch. 700 Requests []*GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest `json:"requests,omitempty"` 701 702 // ForceSendFields is a list of field names (e.g. "Requests") to 703 // unconditionally include in API requests. By default, fields with 704 // empty values are omitted from API requests. However, any non-pointer, 705 // non-interface field appearing in ForceSendFields will be sent to the 706 // server regardless of whether the field is empty or not. This may be 707 // used to include empty fields in Patch requests. 708 ForceSendFields []string `json:"-"` 709 710 // NullFields is a list of field names (e.g. "Requests") to include in 711 // API requests with the JSON null value. By default, fields with empty 712 // values are omitted from API requests. However, any field with an 713 // empty value appearing in NullFields will be sent to the server as 714 // null. It is an error if a field in this list has a non-empty value. 715 // This may be used to include null fields in Patch requests. 716 NullFields []string `json:"-"` 717} 718 719func (s *GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest) MarshalJSON() ([]byte, error) { 720 type NoMethod GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest 721 raw := NoMethod(*s) 722 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 723} 724 725// GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse: Response 726// message for BatchGetUserLinks RPC. 727type GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse struct { 728 // UserLinks: The requested user links. 729 UserLinks []*GoogleAnalyticsAdminV1alphaUserLink `json:"userLinks,omitempty"` 730 731 // ServerResponse contains the HTTP response code and headers from the 732 // server. 733 googleapi.ServerResponse `json:"-"` 734 735 // ForceSendFields is a list of field names (e.g. "UserLinks") to 736 // unconditionally include in API requests. By default, fields with 737 // empty values are omitted from API requests. However, any non-pointer, 738 // non-interface field appearing in ForceSendFields will be sent to the 739 // server regardless of whether the field is empty or not. This may be 740 // used to include empty fields in Patch requests. 741 ForceSendFields []string `json:"-"` 742 743 // NullFields is a list of field names (e.g. "UserLinks") to include in 744 // API requests with the JSON null value. By default, fields with empty 745 // values are omitted from API requests. However, any field with an 746 // empty value appearing in NullFields will be sent to the server as 747 // null. It is an error if a field in this list has a non-empty value. 748 // This may be used to include null fields in Patch requests. 749 NullFields []string `json:"-"` 750} 751 752func (s *GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse) MarshalJSON() ([]byte, error) { 753 type NoMethod GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse 754 raw := NoMethod(*s) 755 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 756} 757 758// GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest: Request 759// message for BatchUpdateUserLinks RPC. 760type GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest struct { 761 // Requests: Required. The requests specifying the user links to update. 762 // A maximum of 1000 user links can be updated in a batch. 763 Requests []*GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest `json:"requests,omitempty"` 764 765 // ForceSendFields is a list of field names (e.g. "Requests") to 766 // unconditionally include in API requests. By default, fields with 767 // empty values are omitted from API requests. However, any non-pointer, 768 // non-interface field appearing in ForceSendFields will be sent to the 769 // server regardless of whether the field is empty or not. This may be 770 // used to include empty fields in Patch requests. 771 ForceSendFields []string `json:"-"` 772 773 // NullFields is a list of field names (e.g. "Requests") to include in 774 // API requests with the JSON null value. By default, fields with empty 775 // values are omitted from API requests. However, any field with an 776 // empty value appearing in NullFields will be sent to the server as 777 // null. It is an error if a field in this list has a non-empty value. 778 // This may be used to include null fields in Patch requests. 779 NullFields []string `json:"-"` 780} 781 782func (s *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest) MarshalJSON() ([]byte, error) { 783 type NoMethod GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest 784 raw := NoMethod(*s) 785 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 786} 787 788// GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse: Response 789// message for BatchUpdateUserLinks RPC. 790type GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse struct { 791 // UserLinks: The user links updated. 792 UserLinks []*GoogleAnalyticsAdminV1alphaUserLink `json:"userLinks,omitempty"` 793 794 // ServerResponse contains the HTTP response code and headers from the 795 // server. 796 googleapi.ServerResponse `json:"-"` 797 798 // ForceSendFields is a list of field names (e.g. "UserLinks") to 799 // unconditionally include in API requests. By default, fields with 800 // empty values are omitted from API requests. However, any non-pointer, 801 // non-interface field appearing in ForceSendFields will be sent to the 802 // server regardless of whether the field is empty or not. This may be 803 // used to include empty fields in Patch requests. 804 ForceSendFields []string `json:"-"` 805 806 // NullFields is a list of field names (e.g. "UserLinks") to include in 807 // API requests with the JSON null value. By default, fields with empty 808 // values are omitted from API requests. However, any field with an 809 // empty value appearing in NullFields will be sent to the server as 810 // null. It is an error if a field in this list has a non-empty value. 811 // This may be used to include null fields in Patch requests. 812 NullFields []string `json:"-"` 813} 814 815func (s *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse) MarshalJSON() ([]byte, error) { 816 type NoMethod GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse 817 raw := NoMethod(*s) 818 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 819} 820 821// GoogleAnalyticsAdminV1alphaChangeHistoryChange: A description of a 822// change to a single Google Analytics resource. 823type GoogleAnalyticsAdminV1alphaChangeHistoryChange struct { 824 // Action: The type of action that changed this resource. 825 // 826 // Possible values: 827 // "ACTION_TYPE_UNSPECIFIED" - Action type unknown or not specified. 828 // "CREATED" - Resource was created in this change. 829 // "UPDATED" - Resource was updated in this change. 830 // "DELETED" - Resource was deleted in this change. 831 Action string `json:"action,omitempty"` 832 833 // Resource: Resource name of the resource whose changes are described 834 // by this entry. 835 Resource string `json:"resource,omitempty"` 836 837 // ResourceAfterChange: Resource contents from after the change was 838 // made. If this resource was deleted in this change, this field will be 839 // missing. 840 ResourceAfterChange *GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource `json:"resourceAfterChange,omitempty"` 841 842 // ResourceBeforeChange: Resource contents from before the change was 843 // made. If this resource was created in this change, this field will be 844 // missing. 845 ResourceBeforeChange *GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource `json:"resourceBeforeChange,omitempty"` 846 847 // ForceSendFields is a list of field names (e.g. "Action") to 848 // unconditionally include in API requests. By default, fields with 849 // empty values are omitted from API requests. However, any non-pointer, 850 // non-interface field appearing in ForceSendFields will be sent to the 851 // server regardless of whether the field is empty or not. This may be 852 // used to include empty fields in Patch requests. 853 ForceSendFields []string `json:"-"` 854 855 // NullFields is a list of field names (e.g. "Action") to include in API 856 // requests with the JSON null value. By default, fields with empty 857 // values are omitted from API requests. However, any field with an 858 // empty value appearing in NullFields will be sent to the server as 859 // null. It is an error if a field in this list has a non-empty value. 860 // This may be used to include null fields in Patch requests. 861 NullFields []string `json:"-"` 862} 863 864func (s *GoogleAnalyticsAdminV1alphaChangeHistoryChange) MarshalJSON() ([]byte, error) { 865 type NoMethod GoogleAnalyticsAdminV1alphaChangeHistoryChange 866 raw := NoMethod(*s) 867 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 868} 869 870// GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource: 871// A snapshot of a resource as before or after the result of a change in 872// change history. 873type GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource struct { 874 // Account: A snapshot of an Account resource in change history. 875 Account *GoogleAnalyticsAdminV1alphaAccount `json:"account,omitempty"` 876 877 // AndroidAppDataStream: A snapshot of an AndroidAppDataStream resource 878 // in change history. 879 AndroidAppDataStream *GoogleAnalyticsAdminV1alphaAndroidAppDataStream `json:"androidAppDataStream,omitempty"` 880 881 // ConversionEvent: A snapshot of a ConversionEvent resource in change 882 // history. 883 ConversionEvent *GoogleAnalyticsAdminV1alphaConversionEvent `json:"conversionEvent,omitempty"` 884 885 // CustomDimension: A snapshot of a CustomDimension resource in change 886 // history. 887 CustomDimension *GoogleAnalyticsAdminV1alphaCustomDimension `json:"customDimension,omitempty"` 888 889 // CustomMetric: A snapshot of a CustomMetric resource in change 890 // history. 891 CustomMetric *GoogleAnalyticsAdminV1alphaCustomMetric `json:"customMetric,omitempty"` 892 893 // FirebaseLink: A snapshot of a FirebaseLink resource in change 894 // history. 895 FirebaseLink *GoogleAnalyticsAdminV1alphaFirebaseLink `json:"firebaseLink,omitempty"` 896 897 // GoogleAdsLink: A snapshot of a GoogleAdsLink resource in change 898 // history. 899 GoogleAdsLink *GoogleAnalyticsAdminV1alphaGoogleAdsLink `json:"googleAdsLink,omitempty"` 900 901 // GoogleSignalsSettings: A snapshot of a GoogleSignalsSettings resource 902 // in change history. 903 GoogleSignalsSettings *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings `json:"googleSignalsSettings,omitempty"` 904 905 // IosAppDataStream: A snapshot of an IosAppDataStream resource in 906 // change history. 907 IosAppDataStream *GoogleAnalyticsAdminV1alphaIosAppDataStream `json:"iosAppDataStream,omitempty"` 908 909 // MeasurementProtocolSecret: A snapshot of a MeasurementProtocolSecret 910 // resource in change history. 911 MeasurementProtocolSecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret `json:"measurementProtocolSecret,omitempty"` 912 913 // Property: A snapshot of a Property resource in change history. 914 Property *GoogleAnalyticsAdminV1alphaProperty `json:"property,omitempty"` 915 916 // WebDataStream: A snapshot of a WebDataStream resource in change 917 // history. 918 WebDataStream *GoogleAnalyticsAdminV1alphaWebDataStream `json:"webDataStream,omitempty"` 919 920 // ForceSendFields is a list of field names (e.g. "Account") to 921 // unconditionally include in API requests. By default, fields with 922 // empty values are omitted from API requests. However, any non-pointer, 923 // non-interface field appearing in ForceSendFields will be sent to the 924 // server regardless of whether the field is empty or not. This may be 925 // used to include empty fields in Patch requests. 926 ForceSendFields []string `json:"-"` 927 928 // NullFields is a list of field names (e.g. "Account") to include in 929 // API requests with the JSON null value. By default, fields with empty 930 // values are omitted from API requests. However, any field with an 931 // empty value appearing in NullFields will be sent to the server as 932 // null. It is an error if a field in this list has a non-empty value. 933 // This may be used to include null fields in Patch requests. 934 NullFields []string `json:"-"` 935} 936 937func (s *GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource) MarshalJSON() ([]byte, error) { 938 type NoMethod GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource 939 raw := NoMethod(*s) 940 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 941} 942 943// GoogleAnalyticsAdminV1alphaChangeHistoryEvent: A set of changes 944// within a Google Analytics account or its child properties that 945// resulted from the same cause. Common causes would be updates made in 946// the Google Analytics UI, changes from customer support, or automatic 947// Google Analytics system changes. 948type GoogleAnalyticsAdminV1alphaChangeHistoryEvent struct { 949 // ActorType: The type of actor that made this change. 950 // 951 // Possible values: 952 // "ACTOR_TYPE_UNSPECIFIED" - Unknown or unspecified actor type. 953 // "USER" - Changes made by the user specified in actor_email. 954 // "SYSTEM" - Changes made by the Google Analytics system. 955 // "SUPPORT" - Changes made by Google Analytics support team staff. 956 ActorType string `json:"actorType,omitempty"` 957 958 // ChangeTime: Time when change was made. 959 ChangeTime string `json:"changeTime,omitempty"` 960 961 // Changes: A list of changes made in this change history event that fit 962 // the filters specified in SearchChangeHistoryEventsRequest. 963 Changes []*GoogleAnalyticsAdminV1alphaChangeHistoryChange `json:"changes,omitempty"` 964 965 // ChangesFiltered: If true, then the list of changes returned was 966 // filtered, and does not represent all changes that occurred in this 967 // event. 968 ChangesFiltered bool `json:"changesFiltered,omitempty"` 969 970 // Id: ID of this change history event. This ID is unique across Google 971 // Analytics. 972 Id string `json:"id,omitempty"` 973 974 // UserActorEmail: Email address of the Google account that made the 975 // change. This will be a valid email address if the actor field is set 976 // to USER, and empty otherwise. Google accounts that have been deleted 977 // will cause an error. 978 UserActorEmail string `json:"userActorEmail,omitempty"` 979 980 // ForceSendFields is a list of field names (e.g. "ActorType") to 981 // unconditionally include in API requests. By default, fields with 982 // empty values are omitted from API requests. However, any non-pointer, 983 // non-interface field appearing in ForceSendFields will be sent to the 984 // server regardless of whether the field is empty or not. This may be 985 // used to include empty fields in Patch requests. 986 ForceSendFields []string `json:"-"` 987 988 // NullFields is a list of field names (e.g. "ActorType") to include in 989 // API requests with the JSON null value. By default, fields with empty 990 // values are omitted from API requests. However, any field with an 991 // empty value appearing in NullFields will be sent to the server as 992 // null. It is an error if a field in this list has a non-empty value. 993 // This may be used to include null fields in Patch requests. 994 NullFields []string `json:"-"` 995} 996 997func (s *GoogleAnalyticsAdminV1alphaChangeHistoryEvent) MarshalJSON() ([]byte, error) { 998 type NoMethod GoogleAnalyticsAdminV1alphaChangeHistoryEvent 999 raw := NoMethod(*s) 1000 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1001} 1002 1003// GoogleAnalyticsAdminV1alphaConversionEvent: A conversion event in a 1004// Google Analytics property. 1005type GoogleAnalyticsAdminV1alphaConversionEvent struct { 1006 // CreateTime: Output only. Time when this conversion event was created 1007 // in the property. 1008 CreateTime string `json:"createTime,omitempty"` 1009 1010 // Custom: Output only. If set to true, this conversion event refers to 1011 // a custom event. If set to false, this conversion event refers to a 1012 // default event in GA. Default events typically have special meaning in 1013 // GA. Default events are usually created for you by the GA system, but 1014 // in some cases can be created by property admins. Custom events count 1015 // towards the maximum number of custom conversion events that may be 1016 // created per property. 1017 Custom bool `json:"custom,omitempty"` 1018 1019 // Deletable: Output only. If set, this event can currently be deleted 1020 // via DeleteConversionEvent. 1021 Deletable bool `json:"deletable,omitempty"` 1022 1023 // EventName: Immutable. The event name for this conversion event. 1024 // Examples: 'click', 'purchase' 1025 EventName string `json:"eventName,omitempty"` 1026 1027 // Name: Output only. Resource name of this conversion event. Format: 1028 // properties/{property}/conversionEvents/{conversion_event} 1029 Name string `json:"name,omitempty"` 1030 1031 // ServerResponse contains the HTTP response code and headers from the 1032 // server. 1033 googleapi.ServerResponse `json:"-"` 1034 1035 // ForceSendFields is a list of field names (e.g. "CreateTime") to 1036 // unconditionally include in API requests. By default, fields with 1037 // empty values are omitted from API requests. However, any non-pointer, 1038 // non-interface field appearing in ForceSendFields will be sent to the 1039 // server regardless of whether the field is empty or not. This may be 1040 // used to include empty fields in Patch requests. 1041 ForceSendFields []string `json:"-"` 1042 1043 // NullFields is a list of field names (e.g. "CreateTime") to include in 1044 // API requests with the JSON null value. By default, fields with empty 1045 // values are omitted from API requests. However, any field with an 1046 // empty value appearing in NullFields will be sent to the server as 1047 // null. It is an error if a field in this list has a non-empty value. 1048 // This may be used to include null fields in Patch requests. 1049 NullFields []string `json:"-"` 1050} 1051 1052func (s *GoogleAnalyticsAdminV1alphaConversionEvent) MarshalJSON() ([]byte, error) { 1053 type NoMethod GoogleAnalyticsAdminV1alphaConversionEvent 1054 raw := NoMethod(*s) 1055 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1056} 1057 1058// GoogleAnalyticsAdminV1alphaCreateUserLinkRequest: Request message for 1059// CreateUserLink RPC. Users can have multiple email addresses 1060// associated with their Google account, and one of these email 1061// addresses is the "primary" email address. Any of the email addresses 1062// associated with a Google account may be used for a new UserLink, but 1063// the returned UserLink will always contain the "primary" email 1064// address. As a result, the input and output email address for this 1065// request may differ. 1066type GoogleAnalyticsAdminV1alphaCreateUserLinkRequest struct { 1067 // NotifyNewUser: Optional. If set, then email the new user notifying 1068 // them that they've been granted permissions to the resource. 1069 NotifyNewUser bool `json:"notifyNewUser,omitempty"` 1070 1071 // Parent: Required. Example format: accounts/1234 1072 Parent string `json:"parent,omitempty"` 1073 1074 // UserLink: Required. The user link to create. 1075 UserLink *GoogleAnalyticsAdminV1alphaUserLink `json:"userLink,omitempty"` 1076 1077 // ForceSendFields is a list of field names (e.g. "NotifyNewUser") to 1078 // unconditionally include in API requests. By default, fields with 1079 // empty values are omitted from API requests. However, any non-pointer, 1080 // non-interface field appearing in ForceSendFields will be sent to the 1081 // server regardless of whether the field is empty or not. This may be 1082 // used to include empty fields in Patch requests. 1083 ForceSendFields []string `json:"-"` 1084 1085 // NullFields is a list of field names (e.g. "NotifyNewUser") to include 1086 // in API requests with the JSON null value. By default, fields with 1087 // empty values are omitted from API requests. However, any field with 1088 // an empty value appearing in NullFields will be sent to the server as 1089 // null. It is an error if a field in this list has a non-empty value. 1090 // This may be used to include null fields in Patch requests. 1091 NullFields []string `json:"-"` 1092} 1093 1094func (s *GoogleAnalyticsAdminV1alphaCreateUserLinkRequest) MarshalJSON() ([]byte, error) { 1095 type NoMethod GoogleAnalyticsAdminV1alphaCreateUserLinkRequest 1096 raw := NoMethod(*s) 1097 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1098} 1099 1100// GoogleAnalyticsAdminV1alphaCustomDimension: A definition for a 1101// CustomDimension. 1102type GoogleAnalyticsAdminV1alphaCustomDimension struct { 1103 // Description: Optional. Description for this custom dimension. Max 1104 // length of 150 characters. 1105 Description string `json:"description,omitempty"` 1106 1107 // DisallowAdsPersonalization: Optional. If set to true, sets this 1108 // dimension as NPA and excludes it from ads personalization. This is 1109 // currently only supported by user-scoped custom dimensions. 1110 DisallowAdsPersonalization bool `json:"disallowAdsPersonalization,omitempty"` 1111 1112 // DisplayName: Required. Display name for this custom dimension as 1113 // shown in the Analytics UI. Max length of 82 characters, alphanumeric 1114 // plus space and underscore starting with a letter. Legacy 1115 // system-generated display names may contain square brackets, but 1116 // updates to this field will never permit square brackets. 1117 DisplayName string `json:"displayName,omitempty"` 1118 1119 // Name: Output only. Resource name for this CustomDimension resource. 1120 // Format: properties/{property}/customDimensions/{customDimension} 1121 Name string `json:"name,omitempty"` 1122 1123 // ParameterName: Required. Immutable. Tagging parameter name for this 1124 // custom dimension. If this is a user-scoped dimension, then this is 1125 // the user property name. If this is an event-scoped dimension, then 1126 // this is the event parameter name. May only contain alphanumeric and 1127 // underscore characters, starting with a letter. Max length of 24 1128 // characters for user-scoped dimensions, 40 characters for event-scoped 1129 // dimensions. 1130 ParameterName string `json:"parameterName,omitempty"` 1131 1132 // Scope: Required. Immutable. The scope of this dimension. 1133 // 1134 // Possible values: 1135 // "DIMENSION_SCOPE_UNSPECIFIED" - Scope unknown or not specified. 1136 // "EVENT" - Dimension scoped to an event. 1137 // "USER" - Dimension scoped to a user. 1138 Scope string `json:"scope,omitempty"` 1139 1140 // ServerResponse contains the HTTP response code and headers from the 1141 // server. 1142 googleapi.ServerResponse `json:"-"` 1143 1144 // ForceSendFields is a list of field names (e.g. "Description") to 1145 // unconditionally include in API requests. By default, fields with 1146 // empty values are omitted from API requests. However, any non-pointer, 1147 // non-interface field appearing in ForceSendFields will be sent to the 1148 // server regardless of whether the field is empty or not. This may be 1149 // used to include empty fields in Patch requests. 1150 ForceSendFields []string `json:"-"` 1151 1152 // NullFields is a list of field names (e.g. "Description") to include 1153 // in API requests with the JSON null value. By default, fields with 1154 // empty values are omitted from API requests. However, any field with 1155 // an empty value appearing in NullFields will be sent to the server as 1156 // null. It is an error if a field in this list has a non-empty value. 1157 // This may be used to include null fields in Patch requests. 1158 NullFields []string `json:"-"` 1159} 1160 1161func (s *GoogleAnalyticsAdminV1alphaCustomDimension) MarshalJSON() ([]byte, error) { 1162 type NoMethod GoogleAnalyticsAdminV1alphaCustomDimension 1163 raw := NoMethod(*s) 1164 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1165} 1166 1167// GoogleAnalyticsAdminV1alphaCustomMetric: A definition for a custom 1168// metric. 1169type GoogleAnalyticsAdminV1alphaCustomMetric struct { 1170 // Description: Optional. Description for this custom dimension. Max 1171 // length of 150 characters. 1172 Description string `json:"description,omitempty"` 1173 1174 // DisplayName: Required. Display name for this custom metric as shown 1175 // in the Analytics UI. Max length of 82 characters, alphanumeric plus 1176 // space and underscore starting with a letter. Legacy system-generated 1177 // display names may contain square brackets, but updates to this field 1178 // will never permit square brackets. 1179 DisplayName string `json:"displayName,omitempty"` 1180 1181 // MeasurementUnit: Required. Immutable. The type for the custom 1182 // metric's value. 1183 // 1184 // Possible values: 1185 // "MEASUREMENT_UNIT_UNSPECIFIED" - MeasurementUnit unspecified or 1186 // missing. 1187 // "STANDARD" - This metric uses default units. 1188 // "CURRENCY" - This metric measures a currency. 1189 // "FEET" - This metric measures feet. 1190 // "METERS" - This metric measures meters. 1191 // "KILOMETERS" - This metric measures kilometers. 1192 // "MILES" - This metric measures miles. 1193 // "MILLISECONDS" - This metric measures milliseconds. 1194 // "SECONDS" - This metric measures seconds. 1195 // "MINUTES" - This metric measures minutes. 1196 // "HOURS" - This metric measures hours. 1197 MeasurementUnit string `json:"measurementUnit,omitempty"` 1198 1199 // Name: Output only. Resource name for this CustomMetric resource. 1200 // Format: properties/{property}/customMetrics/{customMetric} 1201 Name string `json:"name,omitempty"` 1202 1203 // ParameterName: Required. Immutable. Tagging name for this custom 1204 // metric. If this is an event-scoped metric, then this is the event 1205 // parameter name. May only contain alphanumeric and underscore 1206 // charactes, starting with a letter. Max length of 40 characters for 1207 // event-scoped metrics. 1208 ParameterName string `json:"parameterName,omitempty"` 1209 1210 // Scope: Required. Immutable. The scope of this custom metric. 1211 // 1212 // Possible values: 1213 // "METRIC_SCOPE_UNSPECIFIED" - Scope unknown or not specified. 1214 // "EVENT" - Metric scoped to an event. 1215 Scope string `json:"scope,omitempty"` 1216 1217 // ServerResponse contains the HTTP response code and headers from the 1218 // server. 1219 googleapi.ServerResponse `json:"-"` 1220 1221 // ForceSendFields is a list of field names (e.g. "Description") to 1222 // unconditionally include in API requests. By default, fields with 1223 // empty values are omitted from API requests. However, any non-pointer, 1224 // non-interface field appearing in ForceSendFields will be sent to the 1225 // server regardless of whether the field is empty or not. This may be 1226 // used to include empty fields in Patch requests. 1227 ForceSendFields []string `json:"-"` 1228 1229 // NullFields is a list of field names (e.g. "Description") to include 1230 // in API requests with the JSON null value. By default, fields with 1231 // empty values are omitted from API requests. However, any field with 1232 // an empty value appearing in NullFields will be sent to the server as 1233 // null. It is an error if a field in this list has a non-empty value. 1234 // This may be used to include null fields in Patch requests. 1235 NullFields []string `json:"-"` 1236} 1237 1238func (s *GoogleAnalyticsAdminV1alphaCustomMetric) MarshalJSON() ([]byte, error) { 1239 type NoMethod GoogleAnalyticsAdminV1alphaCustomMetric 1240 raw := NoMethod(*s) 1241 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1242} 1243 1244// GoogleAnalyticsAdminV1alphaDataSharingSettings: A resource message 1245// representing data sharing settings of a Google Analytics account. 1246type GoogleAnalyticsAdminV1alphaDataSharingSettings struct { 1247 // Name: Output only. Resource name. Format: 1248 // accounts/{account}/dataSharingSettings Example: 1249 // "accounts/1000/dataSharingSettings" 1250 Name string `json:"name,omitempty"` 1251 1252 // SharingWithGoogleAnySalesEnabled: Allows any of Google sales to 1253 // access the data in order to suggest configuration changes to improve 1254 // results. 1255 SharingWithGoogleAnySalesEnabled bool `json:"sharingWithGoogleAnySalesEnabled,omitempty"` 1256 1257 // SharingWithGoogleAssignedSalesEnabled: Allows Google sales teams that 1258 // are assigned to the customer to access the data in order to suggest 1259 // configuration changes to improve results. Sales team restrictions 1260 // still apply when enabled. 1261 SharingWithGoogleAssignedSalesEnabled bool `json:"sharingWithGoogleAssignedSalesEnabled,omitempty"` 1262 1263 // SharingWithGoogleProductsEnabled: Allows Google to use the data to 1264 // improve other Google products or services. 1265 SharingWithGoogleProductsEnabled bool `json:"sharingWithGoogleProductsEnabled,omitempty"` 1266 1267 // SharingWithGoogleSupportEnabled: Allows Google support to access the 1268 // data in order to help troubleshoot issues. 1269 SharingWithGoogleSupportEnabled bool `json:"sharingWithGoogleSupportEnabled,omitempty"` 1270 1271 // SharingWithOthersEnabled: Allows Google to share the data anonymously 1272 // in aggregate form with others. 1273 SharingWithOthersEnabled bool `json:"sharingWithOthersEnabled,omitempty"` 1274 1275 // ServerResponse contains the HTTP response code and headers from the 1276 // server. 1277 googleapi.ServerResponse `json:"-"` 1278 1279 // ForceSendFields is a list of field names (e.g. "Name") to 1280 // unconditionally include in API requests. By default, fields with 1281 // empty values are omitted from API requests. However, any non-pointer, 1282 // non-interface field appearing in ForceSendFields will be sent to the 1283 // server regardless of whether the field is empty or not. This may be 1284 // used to include empty fields in Patch requests. 1285 ForceSendFields []string `json:"-"` 1286 1287 // NullFields is a list of field names (e.g. "Name") to include in API 1288 // requests with the JSON null value. By default, fields with empty 1289 // values are omitted from API requests. However, any field with an 1290 // empty value appearing in NullFields will be sent to the server as 1291 // null. It is an error if a field in this list has a non-empty value. 1292 // This may be used to include null fields in Patch requests. 1293 NullFields []string `json:"-"` 1294} 1295 1296func (s *GoogleAnalyticsAdminV1alphaDataSharingSettings) MarshalJSON() ([]byte, error) { 1297 type NoMethod GoogleAnalyticsAdminV1alphaDataSharingSettings 1298 raw := NoMethod(*s) 1299 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1300} 1301 1302// GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest: Request message for 1303// DeleteUserLink RPC. 1304type GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest struct { 1305 // Name: Required. Example format: accounts/1234/userLinks/5678 1306 Name string `json:"name,omitempty"` 1307 1308 // ForceSendFields is a list of field names (e.g. "Name") to 1309 // unconditionally include in API requests. By default, fields with 1310 // empty values are omitted from API requests. However, any non-pointer, 1311 // non-interface field appearing in ForceSendFields will be sent to the 1312 // server regardless of whether the field is empty or not. This may be 1313 // used to include empty fields in Patch requests. 1314 ForceSendFields []string `json:"-"` 1315 1316 // NullFields is a list of field names (e.g. "Name") to include in API 1317 // requests with the JSON null value. By default, fields with empty 1318 // values are omitted from API requests. However, any field with an 1319 // empty value appearing in NullFields will be sent to the server as 1320 // null. It is an error if a field in this list has a non-empty value. 1321 // This may be used to include null fields in Patch requests. 1322 NullFields []string `json:"-"` 1323} 1324 1325func (s *GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest) MarshalJSON() ([]byte, error) { 1326 type NoMethod GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest 1327 raw := NoMethod(*s) 1328 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1329} 1330 1331// GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings: Singleton 1332// resource under a WebDataStream, configuring measurement of additional 1333// site interactions and content. 1334type GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings struct { 1335 // FileDownloadsEnabled: If enabled, capture a file download event each 1336 // time a link is clicked with a common document, compressed file, 1337 // application, video, or audio extension. 1338 FileDownloadsEnabled bool `json:"fileDownloadsEnabled,omitempty"` 1339 1340 // Name: Output only. Resource name of this Data Stream. Format: 1341 // properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasuremen 1342 // tSettings Example: 1343 // "properties/1000/webDataStreams/2000/enhancedMeasurementSettings" 1344 Name string `json:"name,omitempty"` 1345 1346 // OutboundClicksEnabled: If enabled, capture an outbound click event 1347 // each time a visitor clicks a link that leads them away from your 1348 // domain. 1349 OutboundClicksEnabled bool `json:"outboundClicksEnabled,omitempty"` 1350 1351 // PageChangesEnabled: If enabled, capture a page view event each time 1352 // the website changes the browser history state. 1353 PageChangesEnabled bool `json:"pageChangesEnabled,omitempty"` 1354 1355 // PageLoadsEnabled: Output only. If enabled, capture a page view event 1356 // each time a page loads. 1357 PageLoadsEnabled bool `json:"pageLoadsEnabled,omitempty"` 1358 1359 // PageViewsEnabled: Output only. If enabled, capture a page view event 1360 // each time a page loads or the website changes the browser history 1361 // state. 1362 PageViewsEnabled bool `json:"pageViewsEnabled,omitempty"` 1363 1364 // ScrollsEnabled: If enabled, capture scroll events each time a visitor 1365 // gets to the bottom of a page. 1366 ScrollsEnabled bool `json:"scrollsEnabled,omitempty"` 1367 1368 // SearchQueryParameter: Required. URL query parameters to interpret as 1369 // site search parameters. Max length is 1024 characters. Must not be 1370 // empty. 1371 SearchQueryParameter string `json:"searchQueryParameter,omitempty"` 1372 1373 // SiteSearchEnabled: If enabled, capture a view search results event 1374 // each time a visitor performs a search on your site (based on a query 1375 // parameter). 1376 SiteSearchEnabled bool `json:"siteSearchEnabled,omitempty"` 1377 1378 // StreamEnabled: Indicates whether Enhanced Measurement Settings will 1379 // be used to automatically measure interactions and content on this web 1380 // stream. Changing this value does not affect the settings themselves, 1381 // but determines whether they are respected. 1382 StreamEnabled bool `json:"streamEnabled,omitempty"` 1383 1384 // UriQueryParameter: Additional URL query parameters. Max length is 1385 // 1024 characters. 1386 UriQueryParameter string `json:"uriQueryParameter,omitempty"` 1387 1388 // VideoEngagementEnabled: If enabled, capture video play, progress, and 1389 // complete events as visitors view embedded videos on your site. 1390 VideoEngagementEnabled bool `json:"videoEngagementEnabled,omitempty"` 1391 1392 // ServerResponse contains the HTTP response code and headers from the 1393 // server. 1394 googleapi.ServerResponse `json:"-"` 1395 1396 // ForceSendFields is a list of field names (e.g. 1397 // "FileDownloadsEnabled") to unconditionally include in API requests. 1398 // By default, fields with empty values are omitted from API requests. 1399 // However, any non-pointer, non-interface field appearing in 1400 // ForceSendFields will be sent to the server regardless of whether the 1401 // field is empty or not. This may be used to include empty fields in 1402 // Patch requests. 1403 ForceSendFields []string `json:"-"` 1404 1405 // NullFields is a list of field names (e.g. "FileDownloadsEnabled") to 1406 // include in API requests with the JSON null value. By default, fields 1407 // with empty values are omitted from API requests. However, any field 1408 // with an empty value appearing in NullFields will be sent to the 1409 // server as null. It is an error if a field in this list has a 1410 // non-empty value. This may be used to include null fields in Patch 1411 // requests. 1412 NullFields []string `json:"-"` 1413} 1414 1415func (s *GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings) MarshalJSON() ([]byte, error) { 1416 type NoMethod GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings 1417 raw := NoMethod(*s) 1418 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1419} 1420 1421// GoogleAnalyticsAdminV1alphaFirebaseLink: A link between an GA4 1422// property and a Firebase project. 1423type GoogleAnalyticsAdminV1alphaFirebaseLink struct { 1424 // CreateTime: Output only. Time when this FirebaseLink was originally 1425 // created. 1426 CreateTime string `json:"createTime,omitempty"` 1427 1428 // Name: Output only. Example format: properties/1234/firebaseLinks/5678 1429 Name string `json:"name,omitempty"` 1430 1431 // Project: Immutable. Firebase project resource name. When creating a 1432 // FirebaseLink, you may provide this resource name using either a 1433 // project number or project ID. Once this resource has been created, 1434 // returned FirebaseLinks will always have a project_name that contains 1435 // a project number. Format: 'projects/{project number}' Example: 1436 // 'projects/1234' 1437 Project string `json:"project,omitempty"` 1438 1439 // ServerResponse contains the HTTP response code and headers from the 1440 // server. 1441 googleapi.ServerResponse `json:"-"` 1442 1443 // ForceSendFields is a list of field names (e.g. "CreateTime") to 1444 // unconditionally include in API requests. By default, fields with 1445 // empty values are omitted from API requests. However, any non-pointer, 1446 // non-interface field appearing in ForceSendFields will be sent to the 1447 // server regardless of whether the field is empty or not. This may be 1448 // used to include empty fields in Patch requests. 1449 ForceSendFields []string `json:"-"` 1450 1451 // NullFields is a list of field names (e.g. "CreateTime") to include in 1452 // API requests with the JSON null value. By default, fields with empty 1453 // values are omitted from API requests. However, any field with an 1454 // empty value appearing in NullFields will be sent to the server as 1455 // null. It is an error if a field in this list has a non-empty value. 1456 // This may be used to include null fields in Patch requests. 1457 NullFields []string `json:"-"` 1458} 1459 1460func (s *GoogleAnalyticsAdminV1alphaFirebaseLink) MarshalJSON() ([]byte, error) { 1461 type NoMethod GoogleAnalyticsAdminV1alphaFirebaseLink 1462 raw := NoMethod(*s) 1463 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1464} 1465 1466// GoogleAnalyticsAdminV1alphaGlobalSiteTag: Read-only resource with the 1467// tag for sending data from a website to a WebDataStream. 1468type GoogleAnalyticsAdminV1alphaGlobalSiteTag struct { 1469 // Name: Output only. Resource name for this GlobalSiteTag resource. 1470 // Format: properties/{propertyId}/globalSiteTag 1471 Name string `json:"name,omitempty"` 1472 1473 // Snippet: Immutable. JavaScript code snippet to be pasted as the first 1474 // item into the head tag of every webpage to measure. 1475 Snippet string `json:"snippet,omitempty"` 1476 1477 // ServerResponse contains the HTTP response code and headers from the 1478 // server. 1479 googleapi.ServerResponse `json:"-"` 1480 1481 // ForceSendFields is a list of field names (e.g. "Name") to 1482 // unconditionally include in API requests. By default, fields with 1483 // empty values are omitted from API requests. However, any non-pointer, 1484 // non-interface field appearing in ForceSendFields will be sent to the 1485 // server regardless of whether the field is empty or not. This may be 1486 // used to include empty fields in Patch requests. 1487 ForceSendFields []string `json:"-"` 1488 1489 // NullFields is a list of field names (e.g. "Name") to include in API 1490 // requests with the JSON null value. By default, fields with empty 1491 // values are omitted from API requests. However, any field with an 1492 // empty value appearing in NullFields will be sent to the server as 1493 // null. It is an error if a field in this list has a non-empty value. 1494 // This may be used to include null fields in Patch requests. 1495 NullFields []string `json:"-"` 1496} 1497 1498func (s *GoogleAnalyticsAdminV1alphaGlobalSiteTag) MarshalJSON() ([]byte, error) { 1499 type NoMethod GoogleAnalyticsAdminV1alphaGlobalSiteTag 1500 raw := NoMethod(*s) 1501 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1502} 1503 1504// GoogleAnalyticsAdminV1alphaGoogleAdsLink: A link between an GA4 1505// property and a Google Ads account. 1506type GoogleAnalyticsAdminV1alphaGoogleAdsLink struct { 1507 // AdsPersonalizationEnabled: Enable personalized advertising features 1508 // with this integration. Automatically publish my Google Analytics 1509 // audience lists and Google Analytics remarketing events/parameters to 1510 // the linked Google Ads account. If this field is not set on 1511 // create/update, it will be defaulted to true. 1512 AdsPersonalizationEnabled bool `json:"adsPersonalizationEnabled,omitempty"` 1513 1514 // CanManageClients: Output only. If true, this link is for a Google Ads 1515 // manager account. 1516 CanManageClients bool `json:"canManageClients,omitempty"` 1517 1518 // CreateTime: Output only. Time when this link was originally created. 1519 CreateTime string `json:"createTime,omitempty"` 1520 1521 // CreatorEmailAddress: Output only. Email address of the user that 1522 // created the link. An empty string will be returned if the email 1523 // address can't be retrieved. 1524 CreatorEmailAddress string `json:"creatorEmailAddress,omitempty"` 1525 1526 // CustomerId: Immutable. Google Ads customer ID. 1527 CustomerId string `json:"customerId,omitempty"` 1528 1529 // Name: Output only. Format: 1530 // properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} Note: 1531 // googleAdsLinkId is not the Google Ads customer ID. 1532 Name string `json:"name,omitempty"` 1533 1534 // UpdateTime: Output only. Time when this link was last updated. 1535 UpdateTime string `json:"updateTime,omitempty"` 1536 1537 // ServerResponse contains the HTTP response code and headers from the 1538 // server. 1539 googleapi.ServerResponse `json:"-"` 1540 1541 // ForceSendFields is a list of field names (e.g. 1542 // "AdsPersonalizationEnabled") to unconditionally include in API 1543 // requests. By default, fields with empty values are omitted from API 1544 // requests. However, any non-pointer, non-interface field appearing in 1545 // ForceSendFields will be sent to the server regardless of whether the 1546 // field is empty or not. This may be used to include empty fields in 1547 // Patch requests. 1548 ForceSendFields []string `json:"-"` 1549 1550 // NullFields is a list of field names (e.g. 1551 // "AdsPersonalizationEnabled") to include in API requests with the JSON 1552 // null value. By default, fields with empty values are omitted from API 1553 // requests. However, any field with an empty value appearing in 1554 // NullFields will be sent to the server as null. It is an error if a 1555 // field in this list has a non-empty value. This may be used to include 1556 // null fields in Patch requests. 1557 NullFields []string `json:"-"` 1558} 1559 1560func (s *GoogleAnalyticsAdminV1alphaGoogleAdsLink) MarshalJSON() ([]byte, error) { 1561 type NoMethod GoogleAnalyticsAdminV1alphaGoogleAdsLink 1562 raw := NoMethod(*s) 1563 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1564} 1565 1566// GoogleAnalyticsAdminV1alphaGoogleSignalsSettings: Settings values for 1567// Google Signals. This is a singleton resource. 1568type GoogleAnalyticsAdminV1alphaGoogleSignalsSettings struct { 1569 // Consent: Output only. Terms of Service acceptance. 1570 // 1571 // Possible values: 1572 // "GOOGLE_SIGNALS_CONSENT_UNSPECIFIED" - Google Signals consent value 1573 // defaults to GOOGLE_SIGNALS_CONSENT_UNSPECIFIED. This will be treated 1574 // as GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED. 1575 // "GOOGLE_SIGNALS_CONSENT_CONSENTED" - Terms of service have been 1576 // accepted 1577 // "GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED" - Terms of service have not 1578 // been accepted 1579 Consent string `json:"consent,omitempty"` 1580 1581 // Name: Output only. Resource name of this setting. Format: 1582 // properties/{property_id}/googleSignalsSettings Example: 1583 // "properties/1000/googleSignalsSettings" 1584 Name string `json:"name,omitempty"` 1585 1586 // State: Status of this setting. 1587 // 1588 // Possible values: 1589 // "GOOGLE_SIGNALS_STATE_UNSPECIFIED" - Google Signals status defaults 1590 // to GOOGLE_SIGNALS_STATE_UNSPECIFIED to represent that the user has 1591 // not made an explicit choice. 1592 // "GOOGLE_SIGNALS_ENABLED" - Google Signals is enabled. 1593 // "GOOGLE_SIGNALS_DISABLED" - Google Signals is disabled. 1594 State string `json:"state,omitempty"` 1595 1596 // ServerResponse contains the HTTP response code and headers from the 1597 // server. 1598 googleapi.ServerResponse `json:"-"` 1599 1600 // ForceSendFields is a list of field names (e.g. "Consent") to 1601 // unconditionally include in API requests. By default, fields with 1602 // empty values are omitted from API requests. However, any non-pointer, 1603 // non-interface field appearing in ForceSendFields will be sent to the 1604 // server regardless of whether the field is empty or not. This may be 1605 // used to include empty fields in Patch requests. 1606 ForceSendFields []string `json:"-"` 1607 1608 // NullFields is a list of field names (e.g. "Consent") to include in 1609 // API requests with the JSON null value. By default, fields with empty 1610 // values are omitted from API requests. However, any field with an 1611 // empty value appearing in NullFields will be sent to the server as 1612 // null. It is an error if a field in this list has a non-empty value. 1613 // This may be used to include null fields in Patch requests. 1614 NullFields []string `json:"-"` 1615} 1616 1617func (s *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings) MarshalJSON() ([]byte, error) { 1618 type NoMethod GoogleAnalyticsAdminV1alphaGoogleSignalsSettings 1619 raw := NoMethod(*s) 1620 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1621} 1622 1623// GoogleAnalyticsAdminV1alphaIosAppDataStream: A resource message 1624// representing a Google Analytics IOS app stream. 1625type GoogleAnalyticsAdminV1alphaIosAppDataStream struct { 1626 // BundleId: Required. Immutable. The Apple App Store Bundle ID for the 1627 // app Example: "com.example.myiosapp" 1628 BundleId string `json:"bundleId,omitempty"` 1629 1630 // CreateTime: Output only. Time when this stream was originally 1631 // created. 1632 CreateTime string `json:"createTime,omitempty"` 1633 1634 // DisplayName: Human-readable display name for the Data Stream. The max 1635 // allowed display name length is 255 UTF-16 code units. 1636 DisplayName string `json:"displayName,omitempty"` 1637 1638 // FirebaseAppId: Output only. ID of the corresponding iOS app in 1639 // Firebase, if any. This ID can change if the iOS app is deleted and 1640 // recreated. 1641 FirebaseAppId string `json:"firebaseAppId,omitempty"` 1642 1643 // Name: Output only. Resource name of this Data Stream. Format: 1644 // properties/{property_id}/iosAppDataStreams/{stream_id} Example: 1645 // "properties/1000/iosAppDataStreams/2000" 1646 Name string `json:"name,omitempty"` 1647 1648 // UpdateTime: Output only. Time when stream payload fields were last 1649 // updated. 1650 UpdateTime string `json:"updateTime,omitempty"` 1651 1652 // ServerResponse contains the HTTP response code and headers from the 1653 // server. 1654 googleapi.ServerResponse `json:"-"` 1655 1656 // ForceSendFields is a list of field names (e.g. "BundleId") to 1657 // unconditionally include in API requests. By default, fields with 1658 // empty values are omitted from API requests. However, any non-pointer, 1659 // non-interface field appearing in ForceSendFields will be sent to the 1660 // server regardless of whether the field is empty or not. This may be 1661 // used to include empty fields in Patch requests. 1662 ForceSendFields []string `json:"-"` 1663 1664 // NullFields is a list of field names (e.g. "BundleId") to include in 1665 // API requests with the JSON null value. By default, fields with empty 1666 // values are omitted from API requests. However, any field with an 1667 // empty value appearing in NullFields will be sent to the server as 1668 // null. It is an error if a field in this list has a non-empty value. 1669 // This may be used to include null fields in Patch requests. 1670 NullFields []string `json:"-"` 1671} 1672 1673func (s *GoogleAnalyticsAdminV1alphaIosAppDataStream) MarshalJSON() ([]byte, error) { 1674 type NoMethod GoogleAnalyticsAdminV1alphaIosAppDataStream 1675 raw := NoMethod(*s) 1676 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1677} 1678 1679// GoogleAnalyticsAdminV1alphaListAccountSummariesResponse: Response 1680// message for ListAccountSummaries RPC. 1681type GoogleAnalyticsAdminV1alphaListAccountSummariesResponse struct { 1682 // AccountSummaries: Account summaries of all accounts the caller has 1683 // access to. 1684 AccountSummaries []*GoogleAnalyticsAdminV1alphaAccountSummary `json:"accountSummaries,omitempty"` 1685 1686 // NextPageToken: A token, which can be sent as `page_token` to retrieve 1687 // the next page. If this field is omitted, there are no subsequent 1688 // pages. 1689 NextPageToken string `json:"nextPageToken,omitempty"` 1690 1691 // ServerResponse contains the HTTP response code and headers from the 1692 // server. 1693 googleapi.ServerResponse `json:"-"` 1694 1695 // ForceSendFields is a list of field names (e.g. "AccountSummaries") to 1696 // unconditionally include in API requests. By default, fields with 1697 // empty values are omitted from API requests. However, any non-pointer, 1698 // non-interface field appearing in ForceSendFields will be sent to the 1699 // server regardless of whether the field is empty or not. This may be 1700 // used to include empty fields in Patch requests. 1701 ForceSendFields []string `json:"-"` 1702 1703 // NullFields is a list of field names (e.g. "AccountSummaries") to 1704 // include in API requests with the JSON null value. By default, fields 1705 // with empty values are omitted from API requests. However, any field 1706 // with an empty value appearing in NullFields will be sent to the 1707 // server as null. It is an error if a field in this list has a 1708 // non-empty value. This may be used to include null fields in Patch 1709 // requests. 1710 NullFields []string `json:"-"` 1711} 1712 1713func (s *GoogleAnalyticsAdminV1alphaListAccountSummariesResponse) MarshalJSON() ([]byte, error) { 1714 type NoMethod GoogleAnalyticsAdminV1alphaListAccountSummariesResponse 1715 raw := NoMethod(*s) 1716 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1717} 1718 1719// GoogleAnalyticsAdminV1alphaListAccountsResponse: Request message for 1720// ListAccounts RPC. 1721type GoogleAnalyticsAdminV1alphaListAccountsResponse struct { 1722 // Accounts: Results that were accessible to the caller. 1723 Accounts []*GoogleAnalyticsAdminV1alphaAccount `json:"accounts,omitempty"` 1724 1725 // NextPageToken: A token, which can be sent as `page_token` to retrieve 1726 // the next page. If this field is omitted, there are no subsequent 1727 // pages. 1728 NextPageToken string `json:"nextPageToken,omitempty"` 1729 1730 // ServerResponse contains the HTTP response code and headers from the 1731 // server. 1732 googleapi.ServerResponse `json:"-"` 1733 1734 // ForceSendFields is a list of field names (e.g. "Accounts") to 1735 // unconditionally include in API requests. By default, fields with 1736 // empty values are omitted from API requests. However, any non-pointer, 1737 // non-interface field appearing in ForceSendFields will be sent to the 1738 // server regardless of whether the field is empty or not. This may be 1739 // used to include empty fields in Patch requests. 1740 ForceSendFields []string `json:"-"` 1741 1742 // NullFields is a list of field names (e.g. "Accounts") to include in 1743 // API requests with the JSON null value. By default, fields with empty 1744 // values are omitted from API requests. However, any field with an 1745 // empty value appearing in NullFields will be sent to the server as 1746 // null. It is an error if a field in this list has a non-empty value. 1747 // This may be used to include null fields in Patch requests. 1748 NullFields []string `json:"-"` 1749} 1750 1751func (s *GoogleAnalyticsAdminV1alphaListAccountsResponse) MarshalJSON() ([]byte, error) { 1752 type NoMethod GoogleAnalyticsAdminV1alphaListAccountsResponse 1753 raw := NoMethod(*s) 1754 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1755} 1756 1757// GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse: Request 1758// message for ListAndroidDataStreams RPC. 1759type GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse struct { 1760 // AndroidAppDataStreams: Results that matched the filter criteria and 1761 // were accessible to the caller. 1762 AndroidAppDataStreams []*GoogleAnalyticsAdminV1alphaAndroidAppDataStream `json:"androidAppDataStreams,omitempty"` 1763 1764 // NextPageToken: A token, which can be sent as `page_token` to retrieve 1765 // the next page. If this field is omitted, there are no subsequent 1766 // pages. 1767 NextPageToken string `json:"nextPageToken,omitempty"` 1768 1769 // ServerResponse contains the HTTP response code and headers from the 1770 // server. 1771 googleapi.ServerResponse `json:"-"` 1772 1773 // ForceSendFields is a list of field names (e.g. 1774 // "AndroidAppDataStreams") to unconditionally include in API requests. 1775 // By default, fields with empty values are omitted from API requests. 1776 // However, any non-pointer, non-interface field appearing in 1777 // ForceSendFields will be sent to the server regardless of whether the 1778 // field is empty or not. This may be used to include empty fields in 1779 // Patch requests. 1780 ForceSendFields []string `json:"-"` 1781 1782 // NullFields is a list of field names (e.g. "AndroidAppDataStreams") to 1783 // include in API requests with the JSON null value. By default, fields 1784 // with empty values are omitted from API requests. However, any field 1785 // with an empty value appearing in NullFields will be sent to the 1786 // server as null. It is an error if a field in this list has a 1787 // non-empty value. This may be used to include null fields in Patch 1788 // requests. 1789 NullFields []string `json:"-"` 1790} 1791 1792func (s *GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse) MarshalJSON() ([]byte, error) { 1793 type NoMethod GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse 1794 raw := NoMethod(*s) 1795 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1796} 1797 1798// GoogleAnalyticsAdminV1alphaListConversionEventsResponse: Response 1799// message for ListConversionEvents RPC. 1800type GoogleAnalyticsAdminV1alphaListConversionEventsResponse struct { 1801 // ConversionEvents: The requested conversion events 1802 ConversionEvents []*GoogleAnalyticsAdminV1alphaConversionEvent `json:"conversionEvents,omitempty"` 1803 1804 // NextPageToken: A token, which can be sent as `page_token` to retrieve 1805 // the next page. If this field is omitted, there are no subsequent 1806 // pages. 1807 NextPageToken string `json:"nextPageToken,omitempty"` 1808 1809 // ServerResponse contains the HTTP response code and headers from the 1810 // server. 1811 googleapi.ServerResponse `json:"-"` 1812 1813 // ForceSendFields is a list of field names (e.g. "ConversionEvents") to 1814 // unconditionally include in API requests. By default, fields with 1815 // empty values are omitted from API requests. However, any non-pointer, 1816 // non-interface field appearing in ForceSendFields will be sent to the 1817 // server regardless of whether the field is empty or not. This may be 1818 // used to include empty fields in Patch requests. 1819 ForceSendFields []string `json:"-"` 1820 1821 // NullFields is a list of field names (e.g. "ConversionEvents") to 1822 // include in API requests with the JSON null value. By default, fields 1823 // with empty values are omitted from API requests. However, any field 1824 // with an empty value appearing in NullFields will be sent to the 1825 // server as null. It is an error if a field in this list has a 1826 // non-empty value. This may be used to include null fields in Patch 1827 // requests. 1828 NullFields []string `json:"-"` 1829} 1830 1831func (s *GoogleAnalyticsAdminV1alphaListConversionEventsResponse) MarshalJSON() ([]byte, error) { 1832 type NoMethod GoogleAnalyticsAdminV1alphaListConversionEventsResponse 1833 raw := NoMethod(*s) 1834 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1835} 1836 1837// GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse: Response 1838// message for ListCustomDimensions RPC. 1839type GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse struct { 1840 // CustomDimensions: List of CustomDimensions. 1841 CustomDimensions []*GoogleAnalyticsAdminV1alphaCustomDimension `json:"customDimensions,omitempty"` 1842 1843 // NextPageToken: A token, which can be sent as `page_token` to retrieve 1844 // the next page. If this field is omitted, there are no subsequent 1845 // pages. 1846 NextPageToken string `json:"nextPageToken,omitempty"` 1847 1848 // ServerResponse contains the HTTP response code and headers from the 1849 // server. 1850 googleapi.ServerResponse `json:"-"` 1851 1852 // ForceSendFields is a list of field names (e.g. "CustomDimensions") to 1853 // unconditionally include in API requests. By default, fields with 1854 // empty values are omitted from API requests. However, any non-pointer, 1855 // non-interface field appearing in ForceSendFields will be sent to the 1856 // server regardless of whether the field is empty or not. This may be 1857 // used to include empty fields in Patch requests. 1858 ForceSendFields []string `json:"-"` 1859 1860 // NullFields is a list of field names (e.g. "CustomDimensions") to 1861 // include in API requests with the JSON null value. By default, fields 1862 // with empty values are omitted from API requests. However, any field 1863 // with an empty value appearing in NullFields will be sent to the 1864 // server as null. It is an error if a field in this list has a 1865 // non-empty value. This may be used to include null fields in Patch 1866 // requests. 1867 NullFields []string `json:"-"` 1868} 1869 1870func (s *GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse) MarshalJSON() ([]byte, error) { 1871 type NoMethod GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse 1872 raw := NoMethod(*s) 1873 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1874} 1875 1876// GoogleAnalyticsAdminV1alphaListCustomMetricsResponse: Response 1877// message for ListCustomMetrics RPC. 1878type GoogleAnalyticsAdminV1alphaListCustomMetricsResponse struct { 1879 // CustomMetrics: List of CustomMetrics. 1880 CustomMetrics []*GoogleAnalyticsAdminV1alphaCustomMetric `json:"customMetrics,omitempty"` 1881 1882 // NextPageToken: A token, which can be sent as `page_token` to retrieve 1883 // the next page. If this field is omitted, there are no subsequent 1884 // pages. 1885 NextPageToken string `json:"nextPageToken,omitempty"` 1886 1887 // ServerResponse contains the HTTP response code and headers from the 1888 // server. 1889 googleapi.ServerResponse `json:"-"` 1890 1891 // ForceSendFields is a list of field names (e.g. "CustomMetrics") to 1892 // unconditionally include in API requests. By default, fields with 1893 // empty values are omitted from API requests. However, any non-pointer, 1894 // non-interface field appearing in ForceSendFields will be sent to the 1895 // server regardless of whether the field is empty or not. This may be 1896 // used to include empty fields in Patch requests. 1897 ForceSendFields []string `json:"-"` 1898 1899 // NullFields is a list of field names (e.g. "CustomMetrics") to include 1900 // in API requests with the JSON null value. By default, fields with 1901 // empty values are omitted from API requests. However, any field with 1902 // an empty value appearing in NullFields will be sent to the server as 1903 // null. It is an error if a field in this list has a non-empty value. 1904 // This may be used to include null fields in Patch requests. 1905 NullFields []string `json:"-"` 1906} 1907 1908func (s *GoogleAnalyticsAdminV1alphaListCustomMetricsResponse) MarshalJSON() ([]byte, error) { 1909 type NoMethod GoogleAnalyticsAdminV1alphaListCustomMetricsResponse 1910 raw := NoMethod(*s) 1911 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1912} 1913 1914// GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse: Response 1915// message for ListFirebaseLinks RPC 1916type GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse struct { 1917 // FirebaseLinks: List of FirebaseLinks. This will have at most one 1918 // value. 1919 FirebaseLinks []*GoogleAnalyticsAdminV1alphaFirebaseLink `json:"firebaseLinks,omitempty"` 1920 1921 // NextPageToken: A token, which can be sent as `page_token` to retrieve 1922 // the next page. If this field is omitted, there are no subsequent 1923 // pages. Currently, Google Analytics supports only one FirebaseLink per 1924 // property, so this will never be populated. 1925 NextPageToken string `json:"nextPageToken,omitempty"` 1926 1927 // ServerResponse contains the HTTP response code and headers from the 1928 // server. 1929 googleapi.ServerResponse `json:"-"` 1930 1931 // ForceSendFields is a list of field names (e.g. "FirebaseLinks") to 1932 // unconditionally include in API requests. By default, fields with 1933 // empty values are omitted from API requests. However, any non-pointer, 1934 // non-interface field appearing in ForceSendFields will be sent to the 1935 // server regardless of whether the field is empty or not. This may be 1936 // used to include empty fields in Patch requests. 1937 ForceSendFields []string `json:"-"` 1938 1939 // NullFields is a list of field names (e.g. "FirebaseLinks") to include 1940 // in API requests with the JSON null value. By default, fields with 1941 // empty values are omitted from API requests. However, any field with 1942 // an empty value appearing in NullFields will be sent to the server as 1943 // null. It is an error if a field in this list has a non-empty value. 1944 // This may be used to include null fields in Patch requests. 1945 NullFields []string `json:"-"` 1946} 1947 1948func (s *GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse) MarshalJSON() ([]byte, error) { 1949 type NoMethod GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse 1950 raw := NoMethod(*s) 1951 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1952} 1953 1954// GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse: Response 1955// message for ListGoogleAdsLinks RPC. 1956type GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse struct { 1957 // GoogleAdsLinks: List of GoogleAdsLinks. 1958 GoogleAdsLinks []*GoogleAnalyticsAdminV1alphaGoogleAdsLink `json:"googleAdsLinks,omitempty"` 1959 1960 // NextPageToken: A token, which can be sent as `page_token` to retrieve 1961 // the next page. If this field is omitted, there are no subsequent 1962 // pages. 1963 NextPageToken string `json:"nextPageToken,omitempty"` 1964 1965 // ServerResponse contains the HTTP response code and headers from the 1966 // server. 1967 googleapi.ServerResponse `json:"-"` 1968 1969 // ForceSendFields is a list of field names (e.g. "GoogleAdsLinks") to 1970 // unconditionally include in API requests. By default, fields with 1971 // empty values are omitted from API requests. However, any non-pointer, 1972 // non-interface field appearing in ForceSendFields will be sent to the 1973 // server regardless of whether the field is empty or not. This may be 1974 // used to include empty fields in Patch requests. 1975 ForceSendFields []string `json:"-"` 1976 1977 // NullFields is a list of field names (e.g. "GoogleAdsLinks") to 1978 // include in API requests with the JSON null value. By default, fields 1979 // with empty values are omitted from API requests. However, any field 1980 // with an empty value appearing in NullFields will be sent to the 1981 // server as null. It is an error if a field in this list has a 1982 // non-empty value. This may be used to include null fields in Patch 1983 // requests. 1984 NullFields []string `json:"-"` 1985} 1986 1987func (s *GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse) MarshalJSON() ([]byte, error) { 1988 type NoMethod GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse 1989 raw := NoMethod(*s) 1990 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1991} 1992 1993// GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse: Request 1994// message for ListIosAppDataStreams RPC. 1995type GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse struct { 1996 // IosAppDataStreams: Results that matched the filter criteria and were 1997 // accessible to the caller. 1998 IosAppDataStreams []*GoogleAnalyticsAdminV1alphaIosAppDataStream `json:"iosAppDataStreams,omitempty"` 1999 2000 // NextPageToken: A token, which can be sent as `page_token` to retrieve 2001 // the next page. If this field is omitted, there are no subsequent 2002 // pages. 2003 NextPageToken string `json:"nextPageToken,omitempty"` 2004 2005 // ServerResponse contains the HTTP response code and headers from the 2006 // server. 2007 googleapi.ServerResponse `json:"-"` 2008 2009 // ForceSendFields is a list of field names (e.g. "IosAppDataStreams") 2010 // to unconditionally include in API requests. By default, fields with 2011 // empty values are omitted from API requests. However, any non-pointer, 2012 // non-interface field appearing in ForceSendFields will be sent to the 2013 // server regardless of whether the field is empty or not. This may be 2014 // used to include empty fields in Patch requests. 2015 ForceSendFields []string `json:"-"` 2016 2017 // NullFields is a list of field names (e.g. "IosAppDataStreams") to 2018 // include in API requests with the JSON null value. By default, fields 2019 // with empty values are omitted from API requests. However, any field 2020 // with an empty value appearing in NullFields will be sent to the 2021 // server as null. It is an error if a field in this list has a 2022 // non-empty value. This may be used to include null fields in Patch 2023 // requests. 2024 NullFields []string `json:"-"` 2025} 2026 2027func (s *GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse) MarshalJSON() ([]byte, error) { 2028 type NoMethod GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse 2029 raw := NoMethod(*s) 2030 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2031} 2032 2033// GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse: 2034// Response message for ListMeasurementProtocolSecret RPC 2035type GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse struct { 2036 // MeasurementProtocolSecrets: A list of secrets for the parent stream 2037 // specified in the request. 2038 MeasurementProtocolSecrets []*GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret `json:"measurementProtocolSecrets,omitempty"` 2039 2040 // NextPageToken: A token, which can be sent as `page_token` to retrieve 2041 // the next page. If this field is omitted, there are no subsequent 2042 // pages. 2043 NextPageToken string `json:"nextPageToken,omitempty"` 2044 2045 // ServerResponse contains the HTTP response code and headers from the 2046 // server. 2047 googleapi.ServerResponse `json:"-"` 2048 2049 // ForceSendFields is a list of field names (e.g. 2050 // "MeasurementProtocolSecrets") to unconditionally include in API 2051 // requests. By default, fields with empty values are omitted from API 2052 // requests. However, any non-pointer, non-interface field appearing in 2053 // ForceSendFields will be sent to the server regardless of whether the 2054 // field is empty or not. This may be used to include empty fields in 2055 // Patch requests. 2056 ForceSendFields []string `json:"-"` 2057 2058 // NullFields is a list of field names (e.g. 2059 // "MeasurementProtocolSecrets") to include in API requests with the 2060 // JSON null value. By default, fields with empty values are omitted 2061 // from API requests. However, any field with an empty value appearing 2062 // in NullFields will be sent to the server as null. It is an error if a 2063 // field in this list has a non-empty value. This may be used to include 2064 // null fields in Patch requests. 2065 NullFields []string `json:"-"` 2066} 2067 2068func (s *GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse) MarshalJSON() ([]byte, error) { 2069 type NoMethod GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse 2070 raw := NoMethod(*s) 2071 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2072} 2073 2074// GoogleAnalyticsAdminV1alphaListPropertiesResponse: Response message 2075// for ListProperties RPC. 2076type GoogleAnalyticsAdminV1alphaListPropertiesResponse struct { 2077 // NextPageToken: A token, which can be sent as `page_token` to retrieve 2078 // the next page. If this field is omitted, there are no subsequent 2079 // pages. 2080 NextPageToken string `json:"nextPageToken,omitempty"` 2081 2082 // Properties: Results that matched the filter criteria and were 2083 // accessible to the caller. 2084 Properties []*GoogleAnalyticsAdminV1alphaProperty `json:"properties,omitempty"` 2085 2086 // ServerResponse contains the HTTP response code and headers from the 2087 // server. 2088 googleapi.ServerResponse `json:"-"` 2089 2090 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2091 // unconditionally include in API requests. By default, fields with 2092 // empty values are omitted from API requests. However, any non-pointer, 2093 // non-interface field appearing in ForceSendFields will be sent to the 2094 // server regardless of whether the field is empty or not. This may be 2095 // used to include empty fields in Patch requests. 2096 ForceSendFields []string `json:"-"` 2097 2098 // NullFields is a list of field names (e.g. "NextPageToken") to include 2099 // in API requests with the JSON null value. By default, fields with 2100 // empty values are omitted from API requests. However, any field with 2101 // an empty value appearing in NullFields will be sent to the server as 2102 // null. It is an error if a field in this list has a non-empty value. 2103 // This may be used to include null fields in Patch requests. 2104 NullFields []string `json:"-"` 2105} 2106 2107func (s *GoogleAnalyticsAdminV1alphaListPropertiesResponse) MarshalJSON() ([]byte, error) { 2108 type NoMethod GoogleAnalyticsAdminV1alphaListPropertiesResponse 2109 raw := NoMethod(*s) 2110 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2111} 2112 2113// GoogleAnalyticsAdminV1alphaListUserLinksResponse: Response message 2114// for ListUserLinks RPC. 2115type GoogleAnalyticsAdminV1alphaListUserLinksResponse struct { 2116 // NextPageToken: A token, which can be sent as `page_token` to retrieve 2117 // the next page. If this field is omitted, there are no subsequent 2118 // pages. 2119 NextPageToken string `json:"nextPageToken,omitempty"` 2120 2121 // UserLinks: List of UserLinks. These will be ordered stably, but in an 2122 // arbitrary order. 2123 UserLinks []*GoogleAnalyticsAdminV1alphaUserLink `json:"userLinks,omitempty"` 2124 2125 // ServerResponse contains the HTTP response code and headers from the 2126 // server. 2127 googleapi.ServerResponse `json:"-"` 2128 2129 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2130 // unconditionally include in API requests. By default, fields with 2131 // empty values are omitted from API requests. However, any non-pointer, 2132 // non-interface field appearing in ForceSendFields will be sent to the 2133 // server regardless of whether the field is empty or not. This may be 2134 // used to include empty fields in Patch requests. 2135 ForceSendFields []string `json:"-"` 2136 2137 // NullFields is a list of field names (e.g. "NextPageToken") to include 2138 // in API requests with the JSON null value. By default, fields with 2139 // empty values are omitted from API requests. However, any field with 2140 // an empty value appearing in NullFields will be sent to the server as 2141 // null. It is an error if a field in this list has a non-empty value. 2142 // This may be used to include null fields in Patch requests. 2143 NullFields []string `json:"-"` 2144} 2145 2146func (s *GoogleAnalyticsAdminV1alphaListUserLinksResponse) MarshalJSON() ([]byte, error) { 2147 type NoMethod GoogleAnalyticsAdminV1alphaListUserLinksResponse 2148 raw := NoMethod(*s) 2149 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2150} 2151 2152// GoogleAnalyticsAdminV1alphaListWebDataStreamsResponse: Request 2153// message for ListWebDataStreams RPC. 2154type GoogleAnalyticsAdminV1alphaListWebDataStreamsResponse struct { 2155 // NextPageToken: A token, which can be sent as `page_token` to retrieve 2156 // the next page. If this field is omitted, there are no subsequent 2157 // pages. 2158 NextPageToken string `json:"nextPageToken,omitempty"` 2159 2160 // WebDataStreams: Results that matched the filter criteria and were 2161 // accessible to the caller. 2162 WebDataStreams []*GoogleAnalyticsAdminV1alphaWebDataStream `json:"webDataStreams,omitempty"` 2163 2164 // ServerResponse contains the HTTP response code and headers from the 2165 // server. 2166 googleapi.ServerResponse `json:"-"` 2167 2168 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2169 // unconditionally include in API requests. By default, fields with 2170 // empty values are omitted from API requests. However, any non-pointer, 2171 // non-interface field appearing in ForceSendFields will be sent to the 2172 // server regardless of whether the field is empty or not. This may be 2173 // used to include empty fields in Patch requests. 2174 ForceSendFields []string `json:"-"` 2175 2176 // NullFields is a list of field names (e.g. "NextPageToken") to include 2177 // in API requests with the JSON null value. By default, fields with 2178 // empty values are omitted from API requests. However, any field with 2179 // an empty value appearing in NullFields will be sent to the server as 2180 // null. It is an error if a field in this list has a non-empty value. 2181 // This may be used to include null fields in Patch requests. 2182 NullFields []string `json:"-"` 2183} 2184 2185func (s *GoogleAnalyticsAdminV1alphaListWebDataStreamsResponse) MarshalJSON() ([]byte, error) { 2186 type NoMethod GoogleAnalyticsAdminV1alphaListWebDataStreamsResponse 2187 raw := NoMethod(*s) 2188 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2189} 2190 2191// GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret: A secret value 2192// used for sending hits to Measurement Protocol. 2193type GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret struct { 2194 // DisplayName: Required. Human-readable display name for this secret. 2195 DisplayName string `json:"displayName,omitempty"` 2196 2197 // Name: Output only. Resource name of this secret. This secret may be a 2198 // child of any type of stream. Format: 2199 // properties/{property}/webDataStreams/{webDataStream}/measurementProtoc 2200 // olSecrets/{measurementProtocolSecret} 2201 Name string `json:"name,omitempty"` 2202 2203 // SecretValue: Output only. The measurement protocol secret value. Pass 2204 // this value to the api_secret field of the Measurement Protocol API 2205 // when sending hits to this secret's parent property. 2206 SecretValue string `json:"secretValue,omitempty"` 2207 2208 // ServerResponse contains the HTTP response code and headers from the 2209 // server. 2210 googleapi.ServerResponse `json:"-"` 2211 2212 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2213 // unconditionally include in API requests. By default, fields with 2214 // empty values are omitted from API requests. However, any non-pointer, 2215 // non-interface field appearing in ForceSendFields will be sent to the 2216 // server regardless of whether the field is empty or not. This may be 2217 // used to include empty fields in Patch requests. 2218 ForceSendFields []string `json:"-"` 2219 2220 // NullFields is a list of field names (e.g. "DisplayName") to include 2221 // in API requests with the JSON null value. By default, fields with 2222 // empty values are omitted from API requests. However, any field with 2223 // an empty value appearing in NullFields will be sent to the server as 2224 // null. It is an error if a field in this list has a non-empty value. 2225 // This may be used to include null fields in Patch requests. 2226 NullFields []string `json:"-"` 2227} 2228 2229func (s *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret) MarshalJSON() ([]byte, error) { 2230 type NoMethod GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret 2231 raw := NoMethod(*s) 2232 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2233} 2234 2235// GoogleAnalyticsAdminV1alphaProperty: A resource message representing 2236// a Google Analytics GA4 property. 2237type GoogleAnalyticsAdminV1alphaProperty struct { 2238 // CreateTime: Output only. Time when the entity was originally created. 2239 CreateTime string `json:"createTime,omitempty"` 2240 2241 // CurrencyCode: The currency type used in reports involving monetary 2242 // values. Format: https://en.wikipedia.org/wiki/ISO_4217 Examples: 2243 // "USD", "EUR", "JPY" 2244 CurrencyCode string `json:"currencyCode,omitempty"` 2245 2246 // DeleteTime: Output only. If set, the time at which this property was 2247 // trashed. If not set, then this property is not currently in the trash 2248 // can. 2249 DeleteTime string `json:"deleteTime,omitempty"` 2250 2251 // DisplayName: Required. Human-readable display name for this property. 2252 // The max allowed display name length is 100 UTF-16 code units. 2253 DisplayName string `json:"displayName,omitempty"` 2254 2255 // ExpireTime: Output only. If set, the time at which this trashed 2256 // property will be permanently deleted. If not set, then this property 2257 // is not currently in the trash can and is not slated to be deleted. 2258 ExpireTime string `json:"expireTime,omitempty"` 2259 2260 // IndustryCategory: Industry associated with this property Example: 2261 // AUTOMOTIVE, FOOD_AND_DRINK 2262 // 2263 // Possible values: 2264 // "INDUSTRY_CATEGORY_UNSPECIFIED" - Industry category unspecified 2265 // "AUTOMOTIVE" - Automotive 2266 // "BUSINESS_AND_INDUSTRIAL_MARKETS" - Business and industrial markets 2267 // "FINANCE" - Finance 2268 // "HEALTHCARE" - Healthcare 2269 // "TECHNOLOGY" - Technology 2270 // "TRAVEL" - Travel 2271 // "OTHER" - Other 2272 // "ARTS_AND_ENTERTAINMENT" - Arts and entertainment 2273 // "BEAUTY_AND_FITNESS" - Beauty and fitness 2274 // "BOOKS_AND_LITERATURE" - Books and literature 2275 // "FOOD_AND_DRINK" - Food and drink 2276 // "GAMES" - Games 2277 // "HOBBIES_AND_LEISURE" - Hobbies and leisure 2278 // "HOME_AND_GARDEN" - Home and garden 2279 // "INTERNET_AND_TELECOM" - Internet and telecom 2280 // "LAW_AND_GOVERNMENT" - Law and government 2281 // "NEWS" - News 2282 // "ONLINE_COMMUNITIES" - Online communities 2283 // "PEOPLE_AND_SOCIETY" - People and society 2284 // "PETS_AND_ANIMALS" - Pets and animals 2285 // "REAL_ESTATE" - Real estate 2286 // "REFERENCE" - Reference 2287 // "SCIENCE" - Science 2288 // "SPORTS" - Sports 2289 // "JOBS_AND_EDUCATION" - Jobs and education 2290 // "SHOPPING" - Shopping 2291 IndustryCategory string `json:"industryCategory,omitempty"` 2292 2293 // Name: Output only. Resource name of this property. Format: 2294 // properties/{property_id} Example: "properties/1000" 2295 Name string `json:"name,omitempty"` 2296 2297 // Parent: Immutable. Resource name of this property's logical parent. 2298 // Note: The Property-Moving UI can be used to change the parent. 2299 // Format: accounts/{account} Example: "accounts/100" 2300 Parent string `json:"parent,omitempty"` 2301 2302 // TimeZone: Required. Reporting Time Zone, used as the day boundary for 2303 // reports, regardless of where the data originates. If the time zone 2304 // honors DST, Analytics will automatically adjust for the changes. 2305 // NOTE: Changing the time zone only affects data going forward, and is 2306 // not applied retroactively. Format: https://www.iana.org/time-zones 2307 // Example: "America/Los_Angeles" 2308 TimeZone string `json:"timeZone,omitempty"` 2309 2310 // UpdateTime: Output only. Time when entity payload fields were last 2311 // updated. 2312 UpdateTime string `json:"updateTime,omitempty"` 2313 2314 // ServerResponse contains the HTTP response code and headers from the 2315 // server. 2316 googleapi.ServerResponse `json:"-"` 2317 2318 // ForceSendFields is a list of field names (e.g. "CreateTime") to 2319 // unconditionally include in API requests. By default, fields with 2320 // empty values are omitted from API requests. However, any non-pointer, 2321 // non-interface field appearing in ForceSendFields will be sent to the 2322 // server regardless of whether the field is empty or not. This may be 2323 // used to include empty fields in Patch requests. 2324 ForceSendFields []string `json:"-"` 2325 2326 // NullFields is a list of field names (e.g. "CreateTime") to include in 2327 // API requests with the JSON null value. By default, fields with empty 2328 // values are omitted from API requests. However, any field with an 2329 // empty value appearing in NullFields will be sent to the server as 2330 // null. It is an error if a field in this list has a non-empty value. 2331 // This may be used to include null fields in Patch requests. 2332 NullFields []string `json:"-"` 2333} 2334 2335func (s *GoogleAnalyticsAdminV1alphaProperty) MarshalJSON() ([]byte, error) { 2336 type NoMethod GoogleAnalyticsAdminV1alphaProperty 2337 raw := NoMethod(*s) 2338 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2339} 2340 2341// GoogleAnalyticsAdminV1alphaPropertySummary: A virtual resource 2342// representing metadata for an GA4 property. 2343type GoogleAnalyticsAdminV1alphaPropertySummary struct { 2344 // DisplayName: Display name for the property referred to in this 2345 // account summary. 2346 DisplayName string `json:"displayName,omitempty"` 2347 2348 // Property: Resource name of property referred to by this property 2349 // summary Format: properties/{property_id} Example: "properties/1000" 2350 Property string `json:"property,omitempty"` 2351 2352 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2353 // unconditionally include in API requests. By default, fields with 2354 // empty values are omitted from API requests. However, any non-pointer, 2355 // non-interface field appearing in ForceSendFields will be sent to the 2356 // server regardless of whether the field is empty or not. This may be 2357 // used to include empty fields in Patch requests. 2358 ForceSendFields []string `json:"-"` 2359 2360 // NullFields is a list of field names (e.g. "DisplayName") to include 2361 // in API requests with the JSON null value. By default, fields with 2362 // empty values are omitted from API requests. However, any field with 2363 // an empty value appearing in NullFields will be sent to the server as 2364 // null. It is an error if a field in this list has a non-empty value. 2365 // This may be used to include null fields in Patch requests. 2366 NullFields []string `json:"-"` 2367} 2368 2369func (s *GoogleAnalyticsAdminV1alphaPropertySummary) MarshalJSON() ([]byte, error) { 2370 type NoMethod GoogleAnalyticsAdminV1alphaPropertySummary 2371 raw := NoMethod(*s) 2372 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2373} 2374 2375// GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest: Request 2376// message for ProvisionAccountTicket RPC. 2377type GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest struct { 2378 // Account: The account to create. 2379 Account *GoogleAnalyticsAdminV1alphaAccount `json:"account,omitempty"` 2380 2381 // RedirectUri: Redirect URI where the user will be sent after accepting 2382 // Terms of Service. Must be configured in Developers Console as a 2383 // Redirect URI 2384 RedirectUri string `json:"redirectUri,omitempty"` 2385 2386 // ForceSendFields is a list of field names (e.g. "Account") to 2387 // unconditionally include in API requests. By default, fields with 2388 // empty values are omitted from API requests. However, any non-pointer, 2389 // non-interface field appearing in ForceSendFields will be sent to the 2390 // server regardless of whether the field is empty or not. This may be 2391 // used to include empty fields in Patch requests. 2392 ForceSendFields []string `json:"-"` 2393 2394 // NullFields is a list of field names (e.g. "Account") to include in 2395 // API requests with the JSON null value. By default, fields with empty 2396 // values are omitted from API requests. However, any field with an 2397 // empty value appearing in NullFields will be sent to the server as 2398 // null. It is an error if a field in this list has a non-empty value. 2399 // This may be used to include null fields in Patch requests. 2400 NullFields []string `json:"-"` 2401} 2402 2403func (s *GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest) MarshalJSON() ([]byte, error) { 2404 type NoMethod GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest 2405 raw := NoMethod(*s) 2406 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2407} 2408 2409// GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse: Response 2410// message for ProvisionAccountTicket RPC. 2411type GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse struct { 2412 // AccountTicketId: The param to be passed in the ToS link. 2413 AccountTicketId string `json:"accountTicketId,omitempty"` 2414 2415 // ServerResponse contains the HTTP response code and headers from the 2416 // server. 2417 googleapi.ServerResponse `json:"-"` 2418 2419 // ForceSendFields is a list of field names (e.g. "AccountTicketId") to 2420 // unconditionally include in API requests. By default, fields with 2421 // empty values are omitted from API requests. However, any non-pointer, 2422 // non-interface field appearing in ForceSendFields will be sent to the 2423 // server regardless of whether the field is empty or not. This may be 2424 // used to include empty fields in Patch requests. 2425 ForceSendFields []string `json:"-"` 2426 2427 // NullFields is a list of field names (e.g. "AccountTicketId") to 2428 // include in API requests with the JSON null value. By default, fields 2429 // with empty values are omitted from API requests. However, any field 2430 // with an empty value appearing in NullFields will be sent to the 2431 // server as null. It is an error if a field in this list has a 2432 // non-empty value. This may be used to include null fields in Patch 2433 // requests. 2434 NullFields []string `json:"-"` 2435} 2436 2437func (s *GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse) MarshalJSON() ([]byte, error) { 2438 type NoMethod GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse 2439 raw := NoMethod(*s) 2440 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2441} 2442 2443// GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest: Request 2444// message for SearchChangeHistoryEvents RPC. 2445type GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest struct { 2446 // Action: Optional. If set, only return changes that match one or more 2447 // of these types of actions. 2448 // 2449 // Possible values: 2450 // "ACTION_TYPE_UNSPECIFIED" - Action type unknown or not specified. 2451 // "CREATED" - Resource was created in this change. 2452 // "UPDATED" - Resource was updated in this change. 2453 // "DELETED" - Resource was deleted in this change. 2454 Action []string `json:"action,omitempty"` 2455 2456 // ActorEmail: Optional. If set, only return changes if they are made by 2457 // a user in this list. 2458 ActorEmail []string `json:"actorEmail,omitempty"` 2459 2460 // EarliestChangeTime: Optional. If set, only return changes made after 2461 // this time (inclusive). 2462 EarliestChangeTime string `json:"earliestChangeTime,omitempty"` 2463 2464 // LatestChangeTime: Optional. If set, only return changes made before 2465 // this time (inclusive). 2466 LatestChangeTime string `json:"latestChangeTime,omitempty"` 2467 2468 // PageSize: Optional. The maximum number of ChangeHistoryEvent items to 2469 // return. The service may return fewer than this value, even if there 2470 // are additional pages. If unspecified, at most 50 items will be 2471 // returned. The maximum value is 200 (higher values will be coerced to 2472 // the maximum). 2473 PageSize int64 `json:"pageSize,omitempty"` 2474 2475 // PageToken: Optional. A page token, received from a previous 2476 // `SearchChangeHistoryEvents` call. Provide this to retrieve the 2477 // subsequent page. When paginating, all other parameters provided to 2478 // `SearchChangeHistoryEvents` must match the call that provided the 2479 // page token. 2480 PageToken string `json:"pageToken,omitempty"` 2481 2482 // Property: Optional. Resource name for a child property. If set, only 2483 // return changes made to this property or its child resources. 2484 Property string `json:"property,omitempty"` 2485 2486 // ResourceType: Optional. If set, only return changes if they are for a 2487 // resource that matches at least one of these types. 2488 // 2489 // Possible values: 2490 // "CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED" - Resource type unknown 2491 // or not specified. 2492 // "ACCOUNT" - Account resource 2493 // "PROPERTY" - Property resource 2494 // "WEB_DATA_STREAM" - WebDataStream resource 2495 // "ANDROID_APP_DATA_STREAM" - AndroidAppDataStream resource 2496 // "IOS_APP_DATA_STREAM" - IosAppDataStream resource 2497 // "FIREBASE_LINK" - FirebaseLink resource 2498 // "GOOGLE_ADS_LINK" - GoogleAdsLink resource 2499 // "GOOGLE_SIGNALS_SETTINGS" - GoogleSignalsSettings resource 2500 // "CONVERSION_EVENT" - ConversionEvent resource 2501 // "MEASUREMENT_PROTOCOL_SECRET" - MeasurementProtocolSecret resource 2502 // "CUSTOM_DIMENSION" - CustomDimension resource 2503 // "CUSTOM_METRIC" - CustomMetric resource 2504 ResourceType []string `json:"resourceType,omitempty"` 2505 2506 // ForceSendFields is a list of field names (e.g. "Action") to 2507 // unconditionally include in API requests. By default, fields with 2508 // empty values are omitted from API requests. However, any non-pointer, 2509 // non-interface field appearing in ForceSendFields will be sent to the 2510 // server regardless of whether the field is empty or not. This may be 2511 // used to include empty fields in Patch requests. 2512 ForceSendFields []string `json:"-"` 2513 2514 // NullFields is a list of field names (e.g. "Action") to include in API 2515 // requests with the JSON null value. By default, fields with empty 2516 // values are omitted from API requests. However, any field with an 2517 // empty value appearing in NullFields will be sent to the server as 2518 // null. It is an error if a field in this list has a non-empty value. 2519 // This may be used to include null fields in Patch requests. 2520 NullFields []string `json:"-"` 2521} 2522 2523func (s *GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest) MarshalJSON() ([]byte, error) { 2524 type NoMethod GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest 2525 raw := NoMethod(*s) 2526 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2527} 2528 2529// GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse: 2530// Response message for SearchAccounts RPC. 2531type GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse struct { 2532 // ChangeHistoryEvents: Results that were accessible to the caller. 2533 ChangeHistoryEvents []*GoogleAnalyticsAdminV1alphaChangeHistoryEvent `json:"changeHistoryEvents,omitempty"` 2534 2535 // NextPageToken: A token, which can be sent as `page_token` to retrieve 2536 // the next page. If this field is omitted, there are no subsequent 2537 // pages. 2538 NextPageToken string `json:"nextPageToken,omitempty"` 2539 2540 // ServerResponse contains the HTTP response code and headers from the 2541 // server. 2542 googleapi.ServerResponse `json:"-"` 2543 2544 // ForceSendFields is a list of field names (e.g. "ChangeHistoryEvents") 2545 // to unconditionally include in API requests. By default, fields with 2546 // empty values are omitted from API requests. However, any non-pointer, 2547 // non-interface field appearing in ForceSendFields will be sent to the 2548 // server regardless of whether the field is empty or not. This may be 2549 // used to include empty fields in Patch requests. 2550 ForceSendFields []string `json:"-"` 2551 2552 // NullFields is a list of field names (e.g. "ChangeHistoryEvents") to 2553 // include in API requests with the JSON null value. By default, fields 2554 // with empty values are omitted from API requests. However, any field 2555 // with an empty value appearing in NullFields will be sent to the 2556 // server as null. It is an error if a field in this list has a 2557 // non-empty value. This may be used to include null fields in Patch 2558 // requests. 2559 NullFields []string `json:"-"` 2560} 2561 2562func (s *GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse) MarshalJSON() ([]byte, error) { 2563 type NoMethod GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse 2564 raw := NoMethod(*s) 2565 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2566} 2567 2568// GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest: Request message for 2569// UpdateUserLink RPC. 2570type GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest struct { 2571 // UserLink: Required. The user link to update. 2572 UserLink *GoogleAnalyticsAdminV1alphaUserLink `json:"userLink,omitempty"` 2573 2574 // ForceSendFields is a list of field names (e.g. "UserLink") to 2575 // unconditionally include in API requests. By default, fields with 2576 // empty values are omitted from API requests. However, any non-pointer, 2577 // non-interface field appearing in ForceSendFields will be sent to the 2578 // server regardless of whether the field is empty or not. This may be 2579 // used to include empty fields in Patch requests. 2580 ForceSendFields []string `json:"-"` 2581 2582 // NullFields is a list of field names (e.g. "UserLink") to include in 2583 // API requests with the JSON null value. By default, fields with empty 2584 // values are omitted from API requests. However, any field with an 2585 // empty value appearing in NullFields will be sent to the server as 2586 // null. It is an error if a field in this list has a non-empty value. 2587 // This may be used to include null fields in Patch requests. 2588 NullFields []string `json:"-"` 2589} 2590 2591func (s *GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest) MarshalJSON() ([]byte, error) { 2592 type NoMethod GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest 2593 raw := NoMethod(*s) 2594 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2595} 2596 2597// GoogleAnalyticsAdminV1alphaUserLink: A resource message representing 2598// a user's permissions on an Account or Property resource. 2599type GoogleAnalyticsAdminV1alphaUserLink struct { 2600 // DirectRoles: Roles directly assigned to this user for this account or 2601 // property. Valid values: predefinedRoles/read 2602 // predefinedRoles/collaborate predefinedRoles/edit 2603 // predefinedRoles/manage-users Excludes roles that are inherited from a 2604 // higher-level entity, group, or organization admin role. A UserLink 2605 // that is updated to have an empty list of direct_roles will be 2606 // deleted. 2607 DirectRoles []string `json:"directRoles,omitempty"` 2608 2609 // EmailAddress: Immutable. Email address of the user to link 2610 EmailAddress string `json:"emailAddress,omitempty"` 2611 2612 // Name: Output only. Example format: properties/1234/userLinks/5678 2613 Name string `json:"name,omitempty"` 2614 2615 // ServerResponse contains the HTTP response code and headers from the 2616 // server. 2617 googleapi.ServerResponse `json:"-"` 2618 2619 // ForceSendFields is a list of field names (e.g. "DirectRoles") to 2620 // unconditionally include in API requests. By default, fields with 2621 // empty values are omitted from API requests. However, any non-pointer, 2622 // non-interface field appearing in ForceSendFields will be sent to the 2623 // server regardless of whether the field is empty or not. This may be 2624 // used to include empty fields in Patch requests. 2625 ForceSendFields []string `json:"-"` 2626 2627 // NullFields is a list of field names (e.g. "DirectRoles") to include 2628 // in API requests with the JSON null value. By default, fields with 2629 // empty values are omitted from API requests. However, any field with 2630 // an empty value appearing in NullFields will be sent to the server as 2631 // null. It is an error if a field in this list has a non-empty value. 2632 // This may be used to include null fields in Patch requests. 2633 NullFields []string `json:"-"` 2634} 2635 2636func (s *GoogleAnalyticsAdminV1alphaUserLink) MarshalJSON() ([]byte, error) { 2637 type NoMethod GoogleAnalyticsAdminV1alphaUserLink 2638 raw := NoMethod(*s) 2639 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2640} 2641 2642// GoogleAnalyticsAdminV1alphaWebDataStream: A resource message 2643// representing a Google Analytics web stream. 2644type GoogleAnalyticsAdminV1alphaWebDataStream struct { 2645 // CreateTime: Output only. Time when this stream was originally 2646 // created. 2647 CreateTime string `json:"createTime,omitempty"` 2648 2649 // DefaultUri: Immutable. Domain name of the web app being measured, or 2650 // empty. Example: "http://www.google.com", "https://www.google.com" 2651 DefaultUri string `json:"defaultUri,omitempty"` 2652 2653 // DisplayName: Required. Human-readable display name for the Data 2654 // Stream. The max allowed display name length is 100 UTF-16 code units. 2655 DisplayName string `json:"displayName,omitempty"` 2656 2657 // FirebaseAppId: Output only. ID of the corresponding web app in 2658 // Firebase, if any. This ID can change if the web app is deleted and 2659 // recreated. 2660 FirebaseAppId string `json:"firebaseAppId,omitempty"` 2661 2662 // MeasurementId: Output only. Analytics "Measurement ID", without the 2663 // "G-" prefix. Example: "G-1A2BCD345E" would just be "1A2BCD345E" 2664 MeasurementId string `json:"measurementId,omitempty"` 2665 2666 // Name: Output only. Resource name of this Data Stream. Format: 2667 // properties/{property_id}/webDataStreams/{stream_id} Example: 2668 // "properties/1000/webDataStreams/2000" 2669 Name string `json:"name,omitempty"` 2670 2671 // UpdateTime: Output only. Time when stream payload fields were last 2672 // updated. 2673 UpdateTime string `json:"updateTime,omitempty"` 2674 2675 // ServerResponse contains the HTTP response code and headers from the 2676 // server. 2677 googleapi.ServerResponse `json:"-"` 2678 2679 // ForceSendFields is a list of field names (e.g. "CreateTime") to 2680 // unconditionally include in API requests. By default, fields with 2681 // empty values are omitted from API requests. However, any non-pointer, 2682 // non-interface field appearing in ForceSendFields will be sent to the 2683 // server regardless of whether the field is empty or not. This may be 2684 // used to include empty fields in Patch requests. 2685 ForceSendFields []string `json:"-"` 2686 2687 // NullFields is a list of field names (e.g. "CreateTime") to include in 2688 // API requests with the JSON null value. By default, fields with empty 2689 // values are omitted from API requests. However, any field with an 2690 // empty value appearing in NullFields will be sent to the server as 2691 // null. It is an error if a field in this list has a non-empty value. 2692 // This may be used to include null fields in Patch requests. 2693 NullFields []string `json:"-"` 2694} 2695 2696func (s *GoogleAnalyticsAdminV1alphaWebDataStream) MarshalJSON() ([]byte, error) { 2697 type NoMethod GoogleAnalyticsAdminV1alphaWebDataStream 2698 raw := NoMethod(*s) 2699 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2700} 2701 2702// GoogleProtobufEmpty: A generic empty message that you can re-use to 2703// avoid defining duplicated empty messages in your APIs. A typical 2704// example is to use it as the request or the response type of an API 2705// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) 2706// returns (google.protobuf.Empty); } The JSON representation for 2707// `Empty` is empty JSON object `{}`. 2708type GoogleProtobufEmpty struct { 2709 // ServerResponse contains the HTTP response code and headers from the 2710 // server. 2711 googleapi.ServerResponse `json:"-"` 2712} 2713 2714// method id "analyticsadmin.accountSummaries.list": 2715 2716type AccountSummariesListCall struct { 2717 s *Service 2718 urlParams_ gensupport.URLParams 2719 ifNoneMatch_ string 2720 ctx_ context.Context 2721 header_ http.Header 2722} 2723 2724// List: Returns summaries of all accounts accessible by the caller. 2725func (r *AccountSummariesService) List() *AccountSummariesListCall { 2726 c := &AccountSummariesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2727 return c 2728} 2729 2730// PageSize sets the optional parameter "pageSize": The maximum number 2731// of AccountSummary resources to return. The service may return fewer 2732// than this value, even if there are additional pages. If unspecified, 2733// at most 50 resources will be returned. The maximum value is 200; 2734// (higher values will be coerced to the maximum) 2735func (c *AccountSummariesListCall) PageSize(pageSize int64) *AccountSummariesListCall { 2736 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 2737 return c 2738} 2739 2740// PageToken sets the optional parameter "pageToken": A page token, 2741// received from a previous `ListAccountSummaries` call. Provide this to 2742// retrieve the subsequent page. When paginating, all other parameters 2743// provided to `ListAccountSummaries` must match the call that provided 2744// the page token. 2745func (c *AccountSummariesListCall) PageToken(pageToken string) *AccountSummariesListCall { 2746 c.urlParams_.Set("pageToken", pageToken) 2747 return c 2748} 2749 2750// Fields allows partial responses to be retrieved. See 2751// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2752// for more information. 2753func (c *AccountSummariesListCall) Fields(s ...googleapi.Field) *AccountSummariesListCall { 2754 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2755 return c 2756} 2757 2758// IfNoneMatch sets the optional parameter which makes the operation 2759// fail if the object's ETag matches the given value. This is useful for 2760// getting updates only after the object has changed since the last 2761// request. Use googleapi.IsNotModified to check whether the response 2762// error from Do is the result of In-None-Match. 2763func (c *AccountSummariesListCall) IfNoneMatch(entityTag string) *AccountSummariesListCall { 2764 c.ifNoneMatch_ = entityTag 2765 return c 2766} 2767 2768// Context sets the context to be used in this call's Do method. Any 2769// pending HTTP request will be aborted if the provided context is 2770// canceled. 2771func (c *AccountSummariesListCall) Context(ctx context.Context) *AccountSummariesListCall { 2772 c.ctx_ = ctx 2773 return c 2774} 2775 2776// Header returns an http.Header that can be modified by the caller to 2777// add HTTP headers to the request. 2778func (c *AccountSummariesListCall) Header() http.Header { 2779 if c.header_ == nil { 2780 c.header_ = make(http.Header) 2781 } 2782 return c.header_ 2783} 2784 2785func (c *AccountSummariesListCall) doRequest(alt string) (*http.Response, error) { 2786 reqHeaders := make(http.Header) 2787 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 2788 for k, v := range c.header_ { 2789 reqHeaders[k] = v 2790 } 2791 reqHeaders.Set("User-Agent", c.s.userAgent()) 2792 if c.ifNoneMatch_ != "" { 2793 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2794 } 2795 var body io.Reader = nil 2796 c.urlParams_.Set("alt", alt) 2797 c.urlParams_.Set("prettyPrint", "false") 2798 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/accountSummaries") 2799 urls += "?" + c.urlParams_.Encode() 2800 req, err := http.NewRequest("GET", urls, body) 2801 if err != nil { 2802 return nil, err 2803 } 2804 req.Header = reqHeaders 2805 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2806} 2807 2808// Do executes the "analyticsadmin.accountSummaries.list" call. 2809// Exactly one of 2810// *GoogleAnalyticsAdminV1alphaListAccountSummariesResponse or error 2811// will be non-nil. Any non-2xx status code is an error. Response 2812// headers are in either 2813// *GoogleAnalyticsAdminV1alphaListAccountSummariesResponse.ServerRespons 2814// e.Header or (if a response was returned at all) in 2815// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2816// whether the returned error was because http.StatusNotModified was 2817// returned. 2818func (c *AccountSummariesListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListAccountSummariesResponse, error) { 2819 gensupport.SetOptions(c.urlParams_, opts...) 2820 res, err := c.doRequest("json") 2821 if res != nil && res.StatusCode == http.StatusNotModified { 2822 if res.Body != nil { 2823 res.Body.Close() 2824 } 2825 return nil, &googleapi.Error{ 2826 Code: res.StatusCode, 2827 Header: res.Header, 2828 } 2829 } 2830 if err != nil { 2831 return nil, err 2832 } 2833 defer googleapi.CloseBody(res) 2834 if err := googleapi.CheckResponse(res); err != nil { 2835 return nil, err 2836 } 2837 ret := &GoogleAnalyticsAdminV1alphaListAccountSummariesResponse{ 2838 ServerResponse: googleapi.ServerResponse{ 2839 Header: res.Header, 2840 HTTPStatusCode: res.StatusCode, 2841 }, 2842 } 2843 target := &ret 2844 if err := gensupport.DecodeResponse(target, res); err != nil { 2845 return nil, err 2846 } 2847 return ret, nil 2848 // { 2849 // "description": "Returns summaries of all accounts accessible by the caller.", 2850 // "flatPath": "v1alpha/accountSummaries", 2851 // "httpMethod": "GET", 2852 // "id": "analyticsadmin.accountSummaries.list", 2853 // "parameterOrder": [], 2854 // "parameters": { 2855 // "pageSize": { 2856 // "description": "The maximum number of AccountSummary resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)", 2857 // "format": "int32", 2858 // "location": "query", 2859 // "type": "integer" 2860 // }, 2861 // "pageToken": { 2862 // "description": "A page token, received from a previous `ListAccountSummaries` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccountSummaries` must match the call that provided the page token.", 2863 // "location": "query", 2864 // "type": "string" 2865 // } 2866 // }, 2867 // "path": "v1alpha/accountSummaries", 2868 // "response": { 2869 // "$ref": "GoogleAnalyticsAdminV1alphaListAccountSummariesResponse" 2870 // }, 2871 // "scopes": [ 2872 // "https://www.googleapis.com/auth/analytics.edit", 2873 // "https://www.googleapis.com/auth/analytics.readonly" 2874 // ] 2875 // } 2876 2877} 2878 2879// Pages invokes f for each page of results. 2880// A non-nil error returned from f will halt the iteration. 2881// The provided context supersedes any context provided to the Context method. 2882func (c *AccountSummariesListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListAccountSummariesResponse) error) error { 2883 c.ctx_ = ctx 2884 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 2885 for { 2886 x, err := c.Do() 2887 if err != nil { 2888 return err 2889 } 2890 if err := f(x); err != nil { 2891 return err 2892 } 2893 if x.NextPageToken == "" { 2894 return nil 2895 } 2896 c.PageToken(x.NextPageToken) 2897 } 2898} 2899 2900// method id "analyticsadmin.accounts.delete": 2901 2902type AccountsDeleteCall struct { 2903 s *Service 2904 name string 2905 urlParams_ gensupport.URLParams 2906 ctx_ context.Context 2907 header_ http.Header 2908} 2909 2910// Delete: Marks target Account as soft-deleted (ie: "trashed") and 2911// returns it. This API does not have a method to restore soft-deleted 2912// accounts. However, they can be restored using the Trash Can UI. If 2913// the accounts are not restored before the expiration time, the account 2914// and all child resources (eg: Properties, GoogleAdsLinks, Streams, 2915// UserLinks) will be permanently purged. 2916// https://support.google.com/analytics/answer/6154772 Returns an error 2917// if the target is not found. 2918// 2919// - name: The name of the Account to soft-delete. Format: 2920// accounts/{account} Example: "accounts/100". 2921func (r *AccountsService) Delete(name string) *AccountsDeleteCall { 2922 c := &AccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2923 c.name = name 2924 return c 2925} 2926 2927// Fields allows partial responses to be retrieved. See 2928// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2929// for more information. 2930func (c *AccountsDeleteCall) Fields(s ...googleapi.Field) *AccountsDeleteCall { 2931 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2932 return c 2933} 2934 2935// Context sets the context to be used in this call's Do method. Any 2936// pending HTTP request will be aborted if the provided context is 2937// canceled. 2938func (c *AccountsDeleteCall) Context(ctx context.Context) *AccountsDeleteCall { 2939 c.ctx_ = ctx 2940 return c 2941} 2942 2943// Header returns an http.Header that can be modified by the caller to 2944// add HTTP headers to the request. 2945func (c *AccountsDeleteCall) Header() http.Header { 2946 if c.header_ == nil { 2947 c.header_ = make(http.Header) 2948 } 2949 return c.header_ 2950} 2951 2952func (c *AccountsDeleteCall) doRequest(alt string) (*http.Response, error) { 2953 reqHeaders := make(http.Header) 2954 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 2955 for k, v := range c.header_ { 2956 reqHeaders[k] = v 2957 } 2958 reqHeaders.Set("User-Agent", c.s.userAgent()) 2959 var body io.Reader = nil 2960 c.urlParams_.Set("alt", alt) 2961 c.urlParams_.Set("prettyPrint", "false") 2962 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 2963 urls += "?" + c.urlParams_.Encode() 2964 req, err := http.NewRequest("DELETE", urls, body) 2965 if err != nil { 2966 return nil, err 2967 } 2968 req.Header = reqHeaders 2969 googleapi.Expand(req.URL, map[string]string{ 2970 "name": c.name, 2971 }) 2972 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2973} 2974 2975// Do executes the "analyticsadmin.accounts.delete" call. 2976// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 2977// non-2xx status code is an error. Response headers are in either 2978// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 2979// returned at all) in error.(*googleapi.Error).Header. Use 2980// googleapi.IsNotModified to check whether the returned error was 2981// because http.StatusNotModified was returned. 2982func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 2983 gensupport.SetOptions(c.urlParams_, opts...) 2984 res, err := c.doRequest("json") 2985 if res != nil && res.StatusCode == http.StatusNotModified { 2986 if res.Body != nil { 2987 res.Body.Close() 2988 } 2989 return nil, &googleapi.Error{ 2990 Code: res.StatusCode, 2991 Header: res.Header, 2992 } 2993 } 2994 if err != nil { 2995 return nil, err 2996 } 2997 defer googleapi.CloseBody(res) 2998 if err := googleapi.CheckResponse(res); err != nil { 2999 return nil, err 3000 } 3001 ret := &GoogleProtobufEmpty{ 3002 ServerResponse: googleapi.ServerResponse{ 3003 Header: res.Header, 3004 HTTPStatusCode: res.StatusCode, 3005 }, 3006 } 3007 target := &ret 3008 if err := gensupport.DecodeResponse(target, res); err != nil { 3009 return nil, err 3010 } 3011 return ret, nil 3012 // { 3013 // "description": "Marks target Account as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted accounts. However, they can be restored using the Trash Can UI. If the accounts are not restored before the expiration time, the account and all child resources (eg: Properties, GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found.", 3014 // "flatPath": "v1alpha/accounts/{accountsId}", 3015 // "httpMethod": "DELETE", 3016 // "id": "analyticsadmin.accounts.delete", 3017 // "parameterOrder": [ 3018 // "name" 3019 // ], 3020 // "parameters": { 3021 // "name": { 3022 // "description": "Required. The name of the Account to soft-delete. Format: accounts/{account} Example: \"accounts/100\"", 3023 // "location": "path", 3024 // "pattern": "^accounts/[^/]+$", 3025 // "required": true, 3026 // "type": "string" 3027 // } 3028 // }, 3029 // "path": "v1alpha/{+name}", 3030 // "response": { 3031 // "$ref": "GoogleProtobufEmpty" 3032 // }, 3033 // "scopes": [ 3034 // "https://www.googleapis.com/auth/analytics.edit" 3035 // ] 3036 // } 3037 3038} 3039 3040// method id "analyticsadmin.accounts.get": 3041 3042type AccountsGetCall struct { 3043 s *Service 3044 name string 3045 urlParams_ gensupport.URLParams 3046 ifNoneMatch_ string 3047 ctx_ context.Context 3048 header_ http.Header 3049} 3050 3051// Get: Lookup for a single Account. 3052// 3053// - name: The name of the account to lookup. Format: accounts/{account} 3054// Example: "accounts/100". 3055func (r *AccountsService) Get(name string) *AccountsGetCall { 3056 c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3057 c.name = name 3058 return c 3059} 3060 3061// Fields allows partial responses to be retrieved. See 3062// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3063// for more information. 3064func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall { 3065 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3066 return c 3067} 3068 3069// IfNoneMatch sets the optional parameter which makes the operation 3070// fail if the object's ETag matches the given value. This is useful for 3071// getting updates only after the object has changed since the last 3072// request. Use googleapi.IsNotModified to check whether the response 3073// error from Do is the result of In-None-Match. 3074func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall { 3075 c.ifNoneMatch_ = entityTag 3076 return c 3077} 3078 3079// Context sets the context to be used in this call's Do method. Any 3080// pending HTTP request will be aborted if the provided context is 3081// canceled. 3082func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall { 3083 c.ctx_ = ctx 3084 return c 3085} 3086 3087// Header returns an http.Header that can be modified by the caller to 3088// add HTTP headers to the request. 3089func (c *AccountsGetCall) Header() http.Header { 3090 if c.header_ == nil { 3091 c.header_ = make(http.Header) 3092 } 3093 return c.header_ 3094} 3095 3096func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) { 3097 reqHeaders := make(http.Header) 3098 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 3099 for k, v := range c.header_ { 3100 reqHeaders[k] = v 3101 } 3102 reqHeaders.Set("User-Agent", c.s.userAgent()) 3103 if c.ifNoneMatch_ != "" { 3104 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3105 } 3106 var body io.Reader = nil 3107 c.urlParams_.Set("alt", alt) 3108 c.urlParams_.Set("prettyPrint", "false") 3109 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 3110 urls += "?" + c.urlParams_.Encode() 3111 req, err := http.NewRequest("GET", urls, body) 3112 if err != nil { 3113 return nil, err 3114 } 3115 req.Header = reqHeaders 3116 googleapi.Expand(req.URL, map[string]string{ 3117 "name": c.name, 3118 }) 3119 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3120} 3121 3122// Do executes the "analyticsadmin.accounts.get" call. 3123// Exactly one of *GoogleAnalyticsAdminV1alphaAccount or error will be 3124// non-nil. Any non-2xx status code is an error. Response headers are in 3125// either *GoogleAnalyticsAdminV1alphaAccount.ServerResponse.Header or 3126// (if a response was returned at all) in 3127// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3128// whether the returned error was because http.StatusNotModified was 3129// returned. 3130func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAccount, error) { 3131 gensupport.SetOptions(c.urlParams_, opts...) 3132 res, err := c.doRequest("json") 3133 if res != nil && res.StatusCode == http.StatusNotModified { 3134 if res.Body != nil { 3135 res.Body.Close() 3136 } 3137 return nil, &googleapi.Error{ 3138 Code: res.StatusCode, 3139 Header: res.Header, 3140 } 3141 } 3142 if err != nil { 3143 return nil, err 3144 } 3145 defer googleapi.CloseBody(res) 3146 if err := googleapi.CheckResponse(res); err != nil { 3147 return nil, err 3148 } 3149 ret := &GoogleAnalyticsAdminV1alphaAccount{ 3150 ServerResponse: googleapi.ServerResponse{ 3151 Header: res.Header, 3152 HTTPStatusCode: res.StatusCode, 3153 }, 3154 } 3155 target := &ret 3156 if err := gensupport.DecodeResponse(target, res); err != nil { 3157 return nil, err 3158 } 3159 return ret, nil 3160 // { 3161 // "description": "Lookup for a single Account.", 3162 // "flatPath": "v1alpha/accounts/{accountsId}", 3163 // "httpMethod": "GET", 3164 // "id": "analyticsadmin.accounts.get", 3165 // "parameterOrder": [ 3166 // "name" 3167 // ], 3168 // "parameters": { 3169 // "name": { 3170 // "description": "Required. The name of the account to lookup. Format: accounts/{account} Example: \"accounts/100\"", 3171 // "location": "path", 3172 // "pattern": "^accounts/[^/]+$", 3173 // "required": true, 3174 // "type": "string" 3175 // } 3176 // }, 3177 // "path": "v1alpha/{+name}", 3178 // "response": { 3179 // "$ref": "GoogleAnalyticsAdminV1alphaAccount" 3180 // }, 3181 // "scopes": [ 3182 // "https://www.googleapis.com/auth/analytics.edit", 3183 // "https://www.googleapis.com/auth/analytics.readonly" 3184 // ] 3185 // } 3186 3187} 3188 3189// method id "analyticsadmin.accounts.getDataSharingSettings": 3190 3191type AccountsGetDataSharingSettingsCall struct { 3192 s *Service 3193 name string 3194 urlParams_ gensupport.URLParams 3195 ifNoneMatch_ string 3196 ctx_ context.Context 3197 header_ http.Header 3198} 3199 3200// GetDataSharingSettings: Get data sharing settings on an account. Data 3201// sharing settings are singletons. 3202// 3203// - name: The name of the settings to lookup. Format: 3204// accounts/{account}/dataSharingSettings Example: 3205// "accounts/1000/dataSharingSettings". 3206func (r *AccountsService) GetDataSharingSettings(name string) *AccountsGetDataSharingSettingsCall { 3207 c := &AccountsGetDataSharingSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3208 c.name = name 3209 return c 3210} 3211 3212// Fields allows partial responses to be retrieved. See 3213// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3214// for more information. 3215func (c *AccountsGetDataSharingSettingsCall) Fields(s ...googleapi.Field) *AccountsGetDataSharingSettingsCall { 3216 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3217 return c 3218} 3219 3220// IfNoneMatch sets the optional parameter which makes the operation 3221// fail if the object's ETag matches the given value. This is useful for 3222// getting updates only after the object has changed since the last 3223// request. Use googleapi.IsNotModified to check whether the response 3224// error from Do is the result of In-None-Match. 3225func (c *AccountsGetDataSharingSettingsCall) IfNoneMatch(entityTag string) *AccountsGetDataSharingSettingsCall { 3226 c.ifNoneMatch_ = entityTag 3227 return c 3228} 3229 3230// Context sets the context to be used in this call's Do method. Any 3231// pending HTTP request will be aborted if the provided context is 3232// canceled. 3233func (c *AccountsGetDataSharingSettingsCall) Context(ctx context.Context) *AccountsGetDataSharingSettingsCall { 3234 c.ctx_ = ctx 3235 return c 3236} 3237 3238// Header returns an http.Header that can be modified by the caller to 3239// add HTTP headers to the request. 3240func (c *AccountsGetDataSharingSettingsCall) Header() http.Header { 3241 if c.header_ == nil { 3242 c.header_ = make(http.Header) 3243 } 3244 return c.header_ 3245} 3246 3247func (c *AccountsGetDataSharingSettingsCall) doRequest(alt string) (*http.Response, error) { 3248 reqHeaders := make(http.Header) 3249 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 3250 for k, v := range c.header_ { 3251 reqHeaders[k] = v 3252 } 3253 reqHeaders.Set("User-Agent", c.s.userAgent()) 3254 if c.ifNoneMatch_ != "" { 3255 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3256 } 3257 var body io.Reader = nil 3258 c.urlParams_.Set("alt", alt) 3259 c.urlParams_.Set("prettyPrint", "false") 3260 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 3261 urls += "?" + c.urlParams_.Encode() 3262 req, err := http.NewRequest("GET", urls, body) 3263 if err != nil { 3264 return nil, err 3265 } 3266 req.Header = reqHeaders 3267 googleapi.Expand(req.URL, map[string]string{ 3268 "name": c.name, 3269 }) 3270 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3271} 3272 3273// Do executes the "analyticsadmin.accounts.getDataSharingSettings" call. 3274// Exactly one of *GoogleAnalyticsAdminV1alphaDataSharingSettings or 3275// error will be non-nil. Any non-2xx status code is an error. Response 3276// headers are in either 3277// *GoogleAnalyticsAdminV1alphaDataSharingSettings.ServerResponse.Header 3278// or (if a response was returned at all) in 3279// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3280// whether the returned error was because http.StatusNotModified was 3281// returned. 3282func (c *AccountsGetDataSharingSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDataSharingSettings, error) { 3283 gensupport.SetOptions(c.urlParams_, opts...) 3284 res, err := c.doRequest("json") 3285 if res != nil && res.StatusCode == http.StatusNotModified { 3286 if res.Body != nil { 3287 res.Body.Close() 3288 } 3289 return nil, &googleapi.Error{ 3290 Code: res.StatusCode, 3291 Header: res.Header, 3292 } 3293 } 3294 if err != nil { 3295 return nil, err 3296 } 3297 defer googleapi.CloseBody(res) 3298 if err := googleapi.CheckResponse(res); err != nil { 3299 return nil, err 3300 } 3301 ret := &GoogleAnalyticsAdminV1alphaDataSharingSettings{ 3302 ServerResponse: googleapi.ServerResponse{ 3303 Header: res.Header, 3304 HTTPStatusCode: res.StatusCode, 3305 }, 3306 } 3307 target := &ret 3308 if err := gensupport.DecodeResponse(target, res); err != nil { 3309 return nil, err 3310 } 3311 return ret, nil 3312 // { 3313 // "description": "Get data sharing settings on an account. Data sharing settings are singletons.", 3314 // "flatPath": "v1alpha/accounts/{accountsId}/dataSharingSettings", 3315 // "httpMethod": "GET", 3316 // "id": "analyticsadmin.accounts.getDataSharingSettings", 3317 // "parameterOrder": [ 3318 // "name" 3319 // ], 3320 // "parameters": { 3321 // "name": { 3322 // "description": "Required. The name of the settings to lookup. Format: accounts/{account}/dataSharingSettings Example: \"accounts/1000/dataSharingSettings\"", 3323 // "location": "path", 3324 // "pattern": "^accounts/[^/]+/dataSharingSettings$", 3325 // "required": true, 3326 // "type": "string" 3327 // } 3328 // }, 3329 // "path": "v1alpha/{+name}", 3330 // "response": { 3331 // "$ref": "GoogleAnalyticsAdminV1alphaDataSharingSettings" 3332 // }, 3333 // "scopes": [ 3334 // "https://www.googleapis.com/auth/analytics.edit", 3335 // "https://www.googleapis.com/auth/analytics.readonly" 3336 // ] 3337 // } 3338 3339} 3340 3341// method id "analyticsadmin.accounts.list": 3342 3343type AccountsListCall struct { 3344 s *Service 3345 urlParams_ gensupport.URLParams 3346 ifNoneMatch_ string 3347 ctx_ context.Context 3348 header_ http.Header 3349} 3350 3351// List: Returns all accounts accessible by the caller. Note that these 3352// accounts might not currently have GA4 properties. Soft-deleted (ie: 3353// "trashed") accounts are excluded by default. Returns an empty list if 3354// no relevant accounts are found. 3355func (r *AccountsService) List() *AccountsListCall { 3356 c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3357 return c 3358} 3359 3360// PageSize sets the optional parameter "pageSize": The maximum number 3361// of resources to return. The service may return fewer than this value, 3362// even if there are additional pages. If unspecified, at most 50 3363// resources will be returned. The maximum value is 200; (higher values 3364// will be coerced to the maximum) 3365func (c *AccountsListCall) PageSize(pageSize int64) *AccountsListCall { 3366 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 3367 return c 3368} 3369 3370// PageToken sets the optional parameter "pageToken": A page token, 3371// received from a previous `ListAccounts` call. Provide this to 3372// retrieve the subsequent page. When paginating, all other parameters 3373// provided to `ListAccounts` must match the call that provided the page 3374// token. 3375func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall { 3376 c.urlParams_.Set("pageToken", pageToken) 3377 return c 3378} 3379 3380// ShowDeleted sets the optional parameter "showDeleted": Whether to 3381// include soft-deleted (ie: "trashed") Accounts in the results. 3382// Accounts can be inspected to determine whether they are deleted or 3383// not. 3384func (c *AccountsListCall) ShowDeleted(showDeleted bool) *AccountsListCall { 3385 c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) 3386 return c 3387} 3388 3389// Fields allows partial responses to be retrieved. See 3390// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3391// for more information. 3392func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall { 3393 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3394 return c 3395} 3396 3397// IfNoneMatch sets the optional parameter which makes the operation 3398// fail if the object's ETag matches the given value. This is useful for 3399// getting updates only after the object has changed since the last 3400// request. Use googleapi.IsNotModified to check whether the response 3401// error from Do is the result of In-None-Match. 3402func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall { 3403 c.ifNoneMatch_ = entityTag 3404 return c 3405} 3406 3407// Context sets the context to be used in this call's Do method. Any 3408// pending HTTP request will be aborted if the provided context is 3409// canceled. 3410func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall { 3411 c.ctx_ = ctx 3412 return c 3413} 3414 3415// Header returns an http.Header that can be modified by the caller to 3416// add HTTP headers to the request. 3417func (c *AccountsListCall) Header() http.Header { 3418 if c.header_ == nil { 3419 c.header_ = make(http.Header) 3420 } 3421 return c.header_ 3422} 3423 3424func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) { 3425 reqHeaders := make(http.Header) 3426 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 3427 for k, v := range c.header_ { 3428 reqHeaders[k] = v 3429 } 3430 reqHeaders.Set("User-Agent", c.s.userAgent()) 3431 if c.ifNoneMatch_ != "" { 3432 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3433 } 3434 var body io.Reader = nil 3435 c.urlParams_.Set("alt", alt) 3436 c.urlParams_.Set("prettyPrint", "false") 3437 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/accounts") 3438 urls += "?" + c.urlParams_.Encode() 3439 req, err := http.NewRequest("GET", urls, body) 3440 if err != nil { 3441 return nil, err 3442 } 3443 req.Header = reqHeaders 3444 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3445} 3446 3447// Do executes the "analyticsadmin.accounts.list" call. 3448// Exactly one of *GoogleAnalyticsAdminV1alphaListAccountsResponse or 3449// error will be non-nil. Any non-2xx status code is an error. Response 3450// headers are in either 3451// *GoogleAnalyticsAdminV1alphaListAccountsResponse.ServerResponse.Header 3452// or (if a response was returned at all) in 3453// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3454// whether the returned error was because http.StatusNotModified was 3455// returned. 3456func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListAccountsResponse, error) { 3457 gensupport.SetOptions(c.urlParams_, opts...) 3458 res, err := c.doRequest("json") 3459 if res != nil && res.StatusCode == http.StatusNotModified { 3460 if res.Body != nil { 3461 res.Body.Close() 3462 } 3463 return nil, &googleapi.Error{ 3464 Code: res.StatusCode, 3465 Header: res.Header, 3466 } 3467 } 3468 if err != nil { 3469 return nil, err 3470 } 3471 defer googleapi.CloseBody(res) 3472 if err := googleapi.CheckResponse(res); err != nil { 3473 return nil, err 3474 } 3475 ret := &GoogleAnalyticsAdminV1alphaListAccountsResponse{ 3476 ServerResponse: googleapi.ServerResponse{ 3477 Header: res.Header, 3478 HTTPStatusCode: res.StatusCode, 3479 }, 3480 } 3481 target := &ret 3482 if err := gensupport.DecodeResponse(target, res); err != nil { 3483 return nil, err 3484 } 3485 return ret, nil 3486 // { 3487 // "description": "Returns all accounts accessible by the caller. Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: \"trashed\") accounts are excluded by default. Returns an empty list if no relevant accounts are found.", 3488 // "flatPath": "v1alpha/accounts", 3489 // "httpMethod": "GET", 3490 // "id": "analyticsadmin.accounts.list", 3491 // "parameterOrder": [], 3492 // "parameters": { 3493 // "pageSize": { 3494 // "description": "The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)", 3495 // "format": "int32", 3496 // "location": "query", 3497 // "type": "integer" 3498 // }, 3499 // "pageToken": { 3500 // "description": "A page token, received from a previous `ListAccounts` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccounts` must match the call that provided the page token.", 3501 // "location": "query", 3502 // "type": "string" 3503 // }, 3504 // "showDeleted": { 3505 // "description": "Whether to include soft-deleted (ie: \"trashed\") Accounts in the results. Accounts can be inspected to determine whether they are deleted or not.", 3506 // "location": "query", 3507 // "type": "boolean" 3508 // } 3509 // }, 3510 // "path": "v1alpha/accounts", 3511 // "response": { 3512 // "$ref": "GoogleAnalyticsAdminV1alphaListAccountsResponse" 3513 // }, 3514 // "scopes": [ 3515 // "https://www.googleapis.com/auth/analytics.edit", 3516 // "https://www.googleapis.com/auth/analytics.readonly" 3517 // ] 3518 // } 3519 3520} 3521 3522// Pages invokes f for each page of results. 3523// A non-nil error returned from f will halt the iteration. 3524// The provided context supersedes any context provided to the Context method. 3525func (c *AccountsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListAccountsResponse) error) error { 3526 c.ctx_ = ctx 3527 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 3528 for { 3529 x, err := c.Do() 3530 if err != nil { 3531 return err 3532 } 3533 if err := f(x); err != nil { 3534 return err 3535 } 3536 if x.NextPageToken == "" { 3537 return nil 3538 } 3539 c.PageToken(x.NextPageToken) 3540 } 3541} 3542 3543// method id "analyticsadmin.accounts.patch": 3544 3545type AccountsPatchCall struct { 3546 s *Service 3547 name string 3548 googleanalyticsadminv1alphaaccount *GoogleAnalyticsAdminV1alphaAccount 3549 urlParams_ gensupport.URLParams 3550 ctx_ context.Context 3551 header_ http.Header 3552} 3553 3554// Patch: Updates an account. 3555// 3556// - name: Output only. Resource name of this account. Format: 3557// accounts/{account} Example: "accounts/100". 3558func (r *AccountsService) Patch(name string, googleanalyticsadminv1alphaaccount *GoogleAnalyticsAdminV1alphaAccount) *AccountsPatchCall { 3559 c := &AccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3560 c.name = name 3561 c.googleanalyticsadminv1alphaaccount = googleanalyticsadminv1alphaaccount 3562 return c 3563} 3564 3565// UpdateMask sets the optional parameter "updateMask": Required. The 3566// list of fields to be updated. Field names must be in snake case 3567// (e.g., "field_to_update"). Omitted fields will not be updated. To 3568// replace the entire entity, use one path with the string "*" to match 3569// all fields. 3570func (c *AccountsPatchCall) UpdateMask(updateMask string) *AccountsPatchCall { 3571 c.urlParams_.Set("updateMask", updateMask) 3572 return c 3573} 3574 3575// Fields allows partial responses to be retrieved. See 3576// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3577// for more information. 3578func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall { 3579 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3580 return c 3581} 3582 3583// Context sets the context to be used in this call's Do method. Any 3584// pending HTTP request will be aborted if the provided context is 3585// canceled. 3586func (c *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall { 3587 c.ctx_ = ctx 3588 return c 3589} 3590 3591// Header returns an http.Header that can be modified by the caller to 3592// add HTTP headers to the request. 3593func (c *AccountsPatchCall) Header() http.Header { 3594 if c.header_ == nil { 3595 c.header_ = make(http.Header) 3596 } 3597 return c.header_ 3598} 3599 3600func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) { 3601 reqHeaders := make(http.Header) 3602 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 3603 for k, v := range c.header_ { 3604 reqHeaders[k] = v 3605 } 3606 reqHeaders.Set("User-Agent", c.s.userAgent()) 3607 var body io.Reader = nil 3608 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaaccount) 3609 if err != nil { 3610 return nil, err 3611 } 3612 reqHeaders.Set("Content-Type", "application/json") 3613 c.urlParams_.Set("alt", alt) 3614 c.urlParams_.Set("prettyPrint", "false") 3615 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 3616 urls += "?" + c.urlParams_.Encode() 3617 req, err := http.NewRequest("PATCH", urls, body) 3618 if err != nil { 3619 return nil, err 3620 } 3621 req.Header = reqHeaders 3622 googleapi.Expand(req.URL, map[string]string{ 3623 "name": c.name, 3624 }) 3625 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3626} 3627 3628// Do executes the "analyticsadmin.accounts.patch" call. 3629// Exactly one of *GoogleAnalyticsAdminV1alphaAccount or error will be 3630// non-nil. Any non-2xx status code is an error. Response headers are in 3631// either *GoogleAnalyticsAdminV1alphaAccount.ServerResponse.Header or 3632// (if a response was returned at all) in 3633// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3634// whether the returned error was because http.StatusNotModified was 3635// returned. 3636func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAccount, error) { 3637 gensupport.SetOptions(c.urlParams_, opts...) 3638 res, err := c.doRequest("json") 3639 if res != nil && res.StatusCode == http.StatusNotModified { 3640 if res.Body != nil { 3641 res.Body.Close() 3642 } 3643 return nil, &googleapi.Error{ 3644 Code: res.StatusCode, 3645 Header: res.Header, 3646 } 3647 } 3648 if err != nil { 3649 return nil, err 3650 } 3651 defer googleapi.CloseBody(res) 3652 if err := googleapi.CheckResponse(res); err != nil { 3653 return nil, err 3654 } 3655 ret := &GoogleAnalyticsAdminV1alphaAccount{ 3656 ServerResponse: googleapi.ServerResponse{ 3657 Header: res.Header, 3658 HTTPStatusCode: res.StatusCode, 3659 }, 3660 } 3661 target := &ret 3662 if err := gensupport.DecodeResponse(target, res); err != nil { 3663 return nil, err 3664 } 3665 return ret, nil 3666 // { 3667 // "description": "Updates an account.", 3668 // "flatPath": "v1alpha/accounts/{accountsId}", 3669 // "httpMethod": "PATCH", 3670 // "id": "analyticsadmin.accounts.patch", 3671 // "parameterOrder": [ 3672 // "name" 3673 // ], 3674 // "parameters": { 3675 // "name": { 3676 // "description": "Output only. Resource name of this account. Format: accounts/{account} Example: \"accounts/100\"", 3677 // "location": "path", 3678 // "pattern": "^accounts/[^/]+$", 3679 // "required": true, 3680 // "type": "string" 3681 // }, 3682 // "updateMask": { 3683 // "description": "Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the entire entity, use one path with the string \"*\" to match all fields.", 3684 // "format": "google-fieldmask", 3685 // "location": "query", 3686 // "type": "string" 3687 // } 3688 // }, 3689 // "path": "v1alpha/{+name}", 3690 // "request": { 3691 // "$ref": "GoogleAnalyticsAdminV1alphaAccount" 3692 // }, 3693 // "response": { 3694 // "$ref": "GoogleAnalyticsAdminV1alphaAccount" 3695 // }, 3696 // "scopes": [ 3697 // "https://www.googleapis.com/auth/analytics.edit" 3698 // ] 3699 // } 3700 3701} 3702 3703// method id "analyticsadmin.accounts.provisionAccountTicket": 3704 3705type AccountsProvisionAccountTicketCall struct { 3706 s *Service 3707 googleanalyticsadminv1alphaprovisionaccountticketrequest *GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest 3708 urlParams_ gensupport.URLParams 3709 ctx_ context.Context 3710 header_ http.Header 3711} 3712 3713// ProvisionAccountTicket: Requests a ticket for creating an account. 3714func (r *AccountsService) ProvisionAccountTicket(googleanalyticsadminv1alphaprovisionaccountticketrequest *GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest) *AccountsProvisionAccountTicketCall { 3715 c := &AccountsProvisionAccountTicketCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3716 c.googleanalyticsadminv1alphaprovisionaccountticketrequest = googleanalyticsadminv1alphaprovisionaccountticketrequest 3717 return c 3718} 3719 3720// Fields allows partial responses to be retrieved. See 3721// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3722// for more information. 3723func (c *AccountsProvisionAccountTicketCall) Fields(s ...googleapi.Field) *AccountsProvisionAccountTicketCall { 3724 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3725 return c 3726} 3727 3728// Context sets the context to be used in this call's Do method. Any 3729// pending HTTP request will be aborted if the provided context is 3730// canceled. 3731func (c *AccountsProvisionAccountTicketCall) Context(ctx context.Context) *AccountsProvisionAccountTicketCall { 3732 c.ctx_ = ctx 3733 return c 3734} 3735 3736// Header returns an http.Header that can be modified by the caller to 3737// add HTTP headers to the request. 3738func (c *AccountsProvisionAccountTicketCall) Header() http.Header { 3739 if c.header_ == nil { 3740 c.header_ = make(http.Header) 3741 } 3742 return c.header_ 3743} 3744 3745func (c *AccountsProvisionAccountTicketCall) doRequest(alt string) (*http.Response, error) { 3746 reqHeaders := make(http.Header) 3747 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 3748 for k, v := range c.header_ { 3749 reqHeaders[k] = v 3750 } 3751 reqHeaders.Set("User-Agent", c.s.userAgent()) 3752 var body io.Reader = nil 3753 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaprovisionaccountticketrequest) 3754 if err != nil { 3755 return nil, err 3756 } 3757 reqHeaders.Set("Content-Type", "application/json") 3758 c.urlParams_.Set("alt", alt) 3759 c.urlParams_.Set("prettyPrint", "false") 3760 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/accounts:provisionAccountTicket") 3761 urls += "?" + c.urlParams_.Encode() 3762 req, err := http.NewRequest("POST", urls, body) 3763 if err != nil { 3764 return nil, err 3765 } 3766 req.Header = reqHeaders 3767 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3768} 3769 3770// Do executes the "analyticsadmin.accounts.provisionAccountTicket" call. 3771// Exactly one of 3772// *GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse or error 3773// will be non-nil. Any non-2xx status code is an error. Response 3774// headers are in either 3775// *GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse.ServerRespo 3776// nse.Header or (if a response was returned at all) in 3777// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3778// whether the returned error was because http.StatusNotModified was 3779// returned. 3780func (c *AccountsProvisionAccountTicketCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse, error) { 3781 gensupport.SetOptions(c.urlParams_, opts...) 3782 res, err := c.doRequest("json") 3783 if res != nil && res.StatusCode == http.StatusNotModified { 3784 if res.Body != nil { 3785 res.Body.Close() 3786 } 3787 return nil, &googleapi.Error{ 3788 Code: res.StatusCode, 3789 Header: res.Header, 3790 } 3791 } 3792 if err != nil { 3793 return nil, err 3794 } 3795 defer googleapi.CloseBody(res) 3796 if err := googleapi.CheckResponse(res); err != nil { 3797 return nil, err 3798 } 3799 ret := &GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse{ 3800 ServerResponse: googleapi.ServerResponse{ 3801 Header: res.Header, 3802 HTTPStatusCode: res.StatusCode, 3803 }, 3804 } 3805 target := &ret 3806 if err := gensupport.DecodeResponse(target, res); err != nil { 3807 return nil, err 3808 } 3809 return ret, nil 3810 // { 3811 // "description": "Requests a ticket for creating an account.", 3812 // "flatPath": "v1alpha/accounts:provisionAccountTicket", 3813 // "httpMethod": "POST", 3814 // "id": "analyticsadmin.accounts.provisionAccountTicket", 3815 // "parameterOrder": [], 3816 // "parameters": {}, 3817 // "path": "v1alpha/accounts:provisionAccountTicket", 3818 // "request": { 3819 // "$ref": "GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest" 3820 // }, 3821 // "response": { 3822 // "$ref": "GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse" 3823 // }, 3824 // "scopes": [ 3825 // "https://www.googleapis.com/auth/analytics.edit" 3826 // ] 3827 // } 3828 3829} 3830 3831// method id "analyticsadmin.accounts.searchChangeHistoryEvents": 3832 3833type AccountsSearchChangeHistoryEventsCall struct { 3834 s *Service 3835 account string 3836 googleanalyticsadminv1alphasearchchangehistoryeventsrequest *GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest 3837 urlParams_ gensupport.URLParams 3838 ctx_ context.Context 3839 header_ http.Header 3840} 3841 3842// SearchChangeHistoryEvents: Searches through all changes to an account 3843// or its children given the specified set of filters. 3844// 3845// - account: The account resource for which to return change history 3846// resources. 3847func (r *AccountsService) SearchChangeHistoryEvents(account string, googleanalyticsadminv1alphasearchchangehistoryeventsrequest *GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest) *AccountsSearchChangeHistoryEventsCall { 3848 c := &AccountsSearchChangeHistoryEventsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3849 c.account = account 3850 c.googleanalyticsadminv1alphasearchchangehistoryeventsrequest = googleanalyticsadminv1alphasearchchangehistoryeventsrequest 3851 return c 3852} 3853 3854// Fields allows partial responses to be retrieved. See 3855// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3856// for more information. 3857func (c *AccountsSearchChangeHistoryEventsCall) Fields(s ...googleapi.Field) *AccountsSearchChangeHistoryEventsCall { 3858 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3859 return c 3860} 3861 3862// Context sets the context to be used in this call's Do method. Any 3863// pending HTTP request will be aborted if the provided context is 3864// canceled. 3865func (c *AccountsSearchChangeHistoryEventsCall) Context(ctx context.Context) *AccountsSearchChangeHistoryEventsCall { 3866 c.ctx_ = ctx 3867 return c 3868} 3869 3870// Header returns an http.Header that can be modified by the caller to 3871// add HTTP headers to the request. 3872func (c *AccountsSearchChangeHistoryEventsCall) Header() http.Header { 3873 if c.header_ == nil { 3874 c.header_ = make(http.Header) 3875 } 3876 return c.header_ 3877} 3878 3879func (c *AccountsSearchChangeHistoryEventsCall) doRequest(alt string) (*http.Response, error) { 3880 reqHeaders := make(http.Header) 3881 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 3882 for k, v := range c.header_ { 3883 reqHeaders[k] = v 3884 } 3885 reqHeaders.Set("User-Agent", c.s.userAgent()) 3886 var body io.Reader = nil 3887 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphasearchchangehistoryeventsrequest) 3888 if err != nil { 3889 return nil, err 3890 } 3891 reqHeaders.Set("Content-Type", "application/json") 3892 c.urlParams_.Set("alt", alt) 3893 c.urlParams_.Set("prettyPrint", "false") 3894 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+account}:searchChangeHistoryEvents") 3895 urls += "?" + c.urlParams_.Encode() 3896 req, err := http.NewRequest("POST", urls, body) 3897 if err != nil { 3898 return nil, err 3899 } 3900 req.Header = reqHeaders 3901 googleapi.Expand(req.URL, map[string]string{ 3902 "account": c.account, 3903 }) 3904 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3905} 3906 3907// Do executes the "analyticsadmin.accounts.searchChangeHistoryEvents" call. 3908// Exactly one of 3909// *GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse or 3910// error will be non-nil. Any non-2xx status code is an error. Response 3911// headers are in either 3912// *GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse.ServerRe 3913// sponse.Header or (if a response was returned at all) in 3914// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3915// whether the returned error was because http.StatusNotModified was 3916// returned. 3917func (c *AccountsSearchChangeHistoryEventsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse, error) { 3918 gensupport.SetOptions(c.urlParams_, opts...) 3919 res, err := c.doRequest("json") 3920 if res != nil && res.StatusCode == http.StatusNotModified { 3921 if res.Body != nil { 3922 res.Body.Close() 3923 } 3924 return nil, &googleapi.Error{ 3925 Code: res.StatusCode, 3926 Header: res.Header, 3927 } 3928 } 3929 if err != nil { 3930 return nil, err 3931 } 3932 defer googleapi.CloseBody(res) 3933 if err := googleapi.CheckResponse(res); err != nil { 3934 return nil, err 3935 } 3936 ret := &GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse{ 3937 ServerResponse: googleapi.ServerResponse{ 3938 Header: res.Header, 3939 HTTPStatusCode: res.StatusCode, 3940 }, 3941 } 3942 target := &ret 3943 if err := gensupport.DecodeResponse(target, res); err != nil { 3944 return nil, err 3945 } 3946 return ret, nil 3947 // { 3948 // "description": "Searches through all changes to an account or its children given the specified set of filters.", 3949 // "flatPath": "v1alpha/accounts/{accountsId}:searchChangeHistoryEvents", 3950 // "httpMethod": "POST", 3951 // "id": "analyticsadmin.accounts.searchChangeHistoryEvents", 3952 // "parameterOrder": [ 3953 // "account" 3954 // ], 3955 // "parameters": { 3956 // "account": { 3957 // "description": "Required. The account resource for which to return change history resources.", 3958 // "location": "path", 3959 // "pattern": "^accounts/[^/]+$", 3960 // "required": true, 3961 // "type": "string" 3962 // } 3963 // }, 3964 // "path": "v1alpha/{+account}:searchChangeHistoryEvents", 3965 // "request": { 3966 // "$ref": "GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest" 3967 // }, 3968 // "response": { 3969 // "$ref": "GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse" 3970 // }, 3971 // "scopes": [ 3972 // "https://www.googleapis.com/auth/analytics.edit" 3973 // ] 3974 // } 3975 3976} 3977 3978// Pages invokes f for each page of results. 3979// A non-nil error returned from f will halt the iteration. 3980// The provided context supersedes any context provided to the Context method. 3981func (c *AccountsSearchChangeHistoryEventsCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse) error) error { 3982 c.ctx_ = ctx 3983 defer func(pt string) { c.googleanalyticsadminv1alphasearchchangehistoryeventsrequest.PageToken = pt }(c.googleanalyticsadminv1alphasearchchangehistoryeventsrequest.PageToken) // reset paging to original point 3984 for { 3985 x, err := c.Do() 3986 if err != nil { 3987 return err 3988 } 3989 if err := f(x); err != nil { 3990 return err 3991 } 3992 if x.NextPageToken == "" { 3993 return nil 3994 } 3995 c.googleanalyticsadminv1alphasearchchangehistoryeventsrequest.PageToken = x.NextPageToken 3996 } 3997} 3998 3999// method id "analyticsadmin.accounts.userLinks.audit": 4000 4001type AccountsUserLinksAuditCall struct { 4002 s *Service 4003 parent string 4004 googleanalyticsadminv1alphaaudituserlinksrequest *GoogleAnalyticsAdminV1alphaAuditUserLinksRequest 4005 urlParams_ gensupport.URLParams 4006 ctx_ context.Context 4007 header_ http.Header 4008} 4009 4010// Audit: Lists all user links on an account or property, including 4011// implicit ones that come from effective permissions granted by groups 4012// or organization admin roles. If a returned user link does not have 4013// direct permissions, they cannot be removed from the account or 4014// property directly with the DeleteUserLink command. They have to be 4015// removed from the group/etc that gives them permissions, which is 4016// currently only usable/discoverable in the GA or GMP UIs. 4017// 4018// - parent: Example format: accounts/1234. 4019func (r *AccountsUserLinksService) Audit(parent string, googleanalyticsadminv1alphaaudituserlinksrequest *GoogleAnalyticsAdminV1alphaAuditUserLinksRequest) *AccountsUserLinksAuditCall { 4020 c := &AccountsUserLinksAuditCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4021 c.parent = parent 4022 c.googleanalyticsadminv1alphaaudituserlinksrequest = googleanalyticsadminv1alphaaudituserlinksrequest 4023 return c 4024} 4025 4026// Fields allows partial responses to be retrieved. See 4027// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4028// for more information. 4029func (c *AccountsUserLinksAuditCall) Fields(s ...googleapi.Field) *AccountsUserLinksAuditCall { 4030 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4031 return c 4032} 4033 4034// Context sets the context to be used in this call's Do method. Any 4035// pending HTTP request will be aborted if the provided context is 4036// canceled. 4037func (c *AccountsUserLinksAuditCall) Context(ctx context.Context) *AccountsUserLinksAuditCall { 4038 c.ctx_ = ctx 4039 return c 4040} 4041 4042// Header returns an http.Header that can be modified by the caller to 4043// add HTTP headers to the request. 4044func (c *AccountsUserLinksAuditCall) Header() http.Header { 4045 if c.header_ == nil { 4046 c.header_ = make(http.Header) 4047 } 4048 return c.header_ 4049} 4050 4051func (c *AccountsUserLinksAuditCall) doRequest(alt string) (*http.Response, error) { 4052 reqHeaders := make(http.Header) 4053 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 4054 for k, v := range c.header_ { 4055 reqHeaders[k] = v 4056 } 4057 reqHeaders.Set("User-Agent", c.s.userAgent()) 4058 var body io.Reader = nil 4059 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaaudituserlinksrequest) 4060 if err != nil { 4061 return nil, err 4062 } 4063 reqHeaders.Set("Content-Type", "application/json") 4064 c.urlParams_.Set("alt", alt) 4065 c.urlParams_.Set("prettyPrint", "false") 4066 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:audit") 4067 urls += "?" + c.urlParams_.Encode() 4068 req, err := http.NewRequest("POST", urls, body) 4069 if err != nil { 4070 return nil, err 4071 } 4072 req.Header = reqHeaders 4073 googleapi.Expand(req.URL, map[string]string{ 4074 "parent": c.parent, 4075 }) 4076 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4077} 4078 4079// Do executes the "analyticsadmin.accounts.userLinks.audit" call. 4080// Exactly one of *GoogleAnalyticsAdminV1alphaAuditUserLinksResponse or 4081// error will be non-nil. Any non-2xx status code is an error. Response 4082// headers are in either 4083// *GoogleAnalyticsAdminV1alphaAuditUserLinksResponse.ServerResponse.Head 4084// er or (if a response was returned at all) in 4085// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4086// whether the returned error was because http.StatusNotModified was 4087// returned. 4088func (c *AccountsUserLinksAuditCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAuditUserLinksResponse, error) { 4089 gensupport.SetOptions(c.urlParams_, opts...) 4090 res, err := c.doRequest("json") 4091 if res != nil && res.StatusCode == http.StatusNotModified { 4092 if res.Body != nil { 4093 res.Body.Close() 4094 } 4095 return nil, &googleapi.Error{ 4096 Code: res.StatusCode, 4097 Header: res.Header, 4098 } 4099 } 4100 if err != nil { 4101 return nil, err 4102 } 4103 defer googleapi.CloseBody(res) 4104 if err := googleapi.CheckResponse(res); err != nil { 4105 return nil, err 4106 } 4107 ret := &GoogleAnalyticsAdminV1alphaAuditUserLinksResponse{ 4108 ServerResponse: googleapi.ServerResponse{ 4109 Header: res.Header, 4110 HTTPStatusCode: res.StatusCode, 4111 }, 4112 } 4113 target := &ret 4114 if err := gensupport.DecodeResponse(target, res); err != nil { 4115 return nil, err 4116 } 4117 return ret, nil 4118 // { 4119 // "description": "Lists all user links on an account or property, including implicit ones that come from effective permissions granted by groups or organization admin roles. If a returned user link does not have direct permissions, they cannot be removed from the account or property directly with the DeleteUserLink command. They have to be removed from the group/etc that gives them permissions, which is currently only usable/discoverable in the GA or GMP UIs.", 4120 // "flatPath": "v1alpha/accounts/{accountsId}/userLinks:audit", 4121 // "httpMethod": "POST", 4122 // "id": "analyticsadmin.accounts.userLinks.audit", 4123 // "parameterOrder": [ 4124 // "parent" 4125 // ], 4126 // "parameters": { 4127 // "parent": { 4128 // "description": "Required. Example format: accounts/1234", 4129 // "location": "path", 4130 // "pattern": "^accounts/[^/]+$", 4131 // "required": true, 4132 // "type": "string" 4133 // } 4134 // }, 4135 // "path": "v1alpha/{+parent}/userLinks:audit", 4136 // "request": { 4137 // "$ref": "GoogleAnalyticsAdminV1alphaAuditUserLinksRequest" 4138 // }, 4139 // "response": { 4140 // "$ref": "GoogleAnalyticsAdminV1alphaAuditUserLinksResponse" 4141 // }, 4142 // "scopes": [ 4143 // "https://www.googleapis.com/auth/analytics.manage.users", 4144 // "https://www.googleapis.com/auth/analytics.manage.users.readonly" 4145 // ] 4146 // } 4147 4148} 4149 4150// Pages invokes f for each page of results. 4151// A non-nil error returned from f will halt the iteration. 4152// The provided context supersedes any context provided to the Context method. 4153func (c *AccountsUserLinksAuditCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaAuditUserLinksResponse) error) error { 4154 c.ctx_ = ctx 4155 defer func(pt string) { c.googleanalyticsadminv1alphaaudituserlinksrequest.PageToken = pt }(c.googleanalyticsadminv1alphaaudituserlinksrequest.PageToken) // reset paging to original point 4156 for { 4157 x, err := c.Do() 4158 if err != nil { 4159 return err 4160 } 4161 if err := f(x); err != nil { 4162 return err 4163 } 4164 if x.NextPageToken == "" { 4165 return nil 4166 } 4167 c.googleanalyticsadminv1alphaaudituserlinksrequest.PageToken = x.NextPageToken 4168 } 4169} 4170 4171// method id "analyticsadmin.accounts.userLinks.batchCreate": 4172 4173type AccountsUserLinksBatchCreateCall struct { 4174 s *Service 4175 parent string 4176 googleanalyticsadminv1alphabatchcreateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest 4177 urlParams_ gensupport.URLParams 4178 ctx_ context.Context 4179 header_ http.Header 4180} 4181 4182// BatchCreate: Creates information about multiple users' links to an 4183// account or property. This method is transactional. If any UserLink 4184// cannot be created, none of the UserLinks will be created. 4185// 4186// - parent: The account or property that all user links in the request 4187// are for. This field is required. The parent field in the 4188// CreateUserLinkRequest messages must either be empty or match this 4189// field. Example format: accounts/1234. 4190func (r *AccountsUserLinksService) BatchCreate(parent string, googleanalyticsadminv1alphabatchcreateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest) *AccountsUserLinksBatchCreateCall { 4191 c := &AccountsUserLinksBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4192 c.parent = parent 4193 c.googleanalyticsadminv1alphabatchcreateuserlinksrequest = googleanalyticsadminv1alphabatchcreateuserlinksrequest 4194 return c 4195} 4196 4197// Fields allows partial responses to be retrieved. See 4198// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4199// for more information. 4200func (c *AccountsUserLinksBatchCreateCall) Fields(s ...googleapi.Field) *AccountsUserLinksBatchCreateCall { 4201 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4202 return c 4203} 4204 4205// Context sets the context to be used in this call's Do method. Any 4206// pending HTTP request will be aborted if the provided context is 4207// canceled. 4208func (c *AccountsUserLinksBatchCreateCall) Context(ctx context.Context) *AccountsUserLinksBatchCreateCall { 4209 c.ctx_ = ctx 4210 return c 4211} 4212 4213// Header returns an http.Header that can be modified by the caller to 4214// add HTTP headers to the request. 4215func (c *AccountsUserLinksBatchCreateCall) Header() http.Header { 4216 if c.header_ == nil { 4217 c.header_ = make(http.Header) 4218 } 4219 return c.header_ 4220} 4221 4222func (c *AccountsUserLinksBatchCreateCall) doRequest(alt string) (*http.Response, error) { 4223 reqHeaders := make(http.Header) 4224 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 4225 for k, v := range c.header_ { 4226 reqHeaders[k] = v 4227 } 4228 reqHeaders.Set("User-Agent", c.s.userAgent()) 4229 var body io.Reader = nil 4230 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphabatchcreateuserlinksrequest) 4231 if err != nil { 4232 return nil, err 4233 } 4234 reqHeaders.Set("Content-Type", "application/json") 4235 c.urlParams_.Set("alt", alt) 4236 c.urlParams_.Set("prettyPrint", "false") 4237 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:batchCreate") 4238 urls += "?" + c.urlParams_.Encode() 4239 req, err := http.NewRequest("POST", urls, body) 4240 if err != nil { 4241 return nil, err 4242 } 4243 req.Header = reqHeaders 4244 googleapi.Expand(req.URL, map[string]string{ 4245 "parent": c.parent, 4246 }) 4247 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4248} 4249 4250// Do executes the "analyticsadmin.accounts.userLinks.batchCreate" call. 4251// Exactly one of 4252// *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse or error 4253// will be non-nil. Any non-2xx status code is an error. Response 4254// headers are in either 4255// *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse.ServerRespons 4256// e.Header or (if a response was returned at all) in 4257// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4258// whether the returned error was because http.StatusNotModified was 4259// returned. 4260func (c *AccountsUserLinksBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse, error) { 4261 gensupport.SetOptions(c.urlParams_, opts...) 4262 res, err := c.doRequest("json") 4263 if res != nil && res.StatusCode == http.StatusNotModified { 4264 if res.Body != nil { 4265 res.Body.Close() 4266 } 4267 return nil, &googleapi.Error{ 4268 Code: res.StatusCode, 4269 Header: res.Header, 4270 } 4271 } 4272 if err != nil { 4273 return nil, err 4274 } 4275 defer googleapi.CloseBody(res) 4276 if err := googleapi.CheckResponse(res); err != nil { 4277 return nil, err 4278 } 4279 ret := &GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse{ 4280 ServerResponse: googleapi.ServerResponse{ 4281 Header: res.Header, 4282 HTTPStatusCode: res.StatusCode, 4283 }, 4284 } 4285 target := &ret 4286 if err := gensupport.DecodeResponse(target, res); err != nil { 4287 return nil, err 4288 } 4289 return ret, nil 4290 // { 4291 // "description": "Creates information about multiple users' links to an account or property. This method is transactional. If any UserLink cannot be created, none of the UserLinks will be created.", 4292 // "flatPath": "v1alpha/accounts/{accountsId}/userLinks:batchCreate", 4293 // "httpMethod": "POST", 4294 // "id": "analyticsadmin.accounts.userLinks.batchCreate", 4295 // "parameterOrder": [ 4296 // "parent" 4297 // ], 4298 // "parameters": { 4299 // "parent": { 4300 // "description": "Required. The account or property that all user links in the request are for. This field is required. The parent field in the CreateUserLinkRequest messages must either be empty or match this field. Example format: accounts/1234", 4301 // "location": "path", 4302 // "pattern": "^accounts/[^/]+$", 4303 // "required": true, 4304 // "type": "string" 4305 // } 4306 // }, 4307 // "path": "v1alpha/{+parent}/userLinks:batchCreate", 4308 // "request": { 4309 // "$ref": "GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest" 4310 // }, 4311 // "response": { 4312 // "$ref": "GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse" 4313 // }, 4314 // "scopes": [ 4315 // "https://www.googleapis.com/auth/analytics.manage.users" 4316 // ] 4317 // } 4318 4319} 4320 4321// method id "analyticsadmin.accounts.userLinks.batchDelete": 4322 4323type AccountsUserLinksBatchDeleteCall struct { 4324 s *Service 4325 parent string 4326 googleanalyticsadminv1alphabatchdeleteuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest 4327 urlParams_ gensupport.URLParams 4328 ctx_ context.Context 4329 header_ http.Header 4330} 4331 4332// BatchDelete: Deletes information about multiple users' links to an 4333// account or property. 4334// 4335// - parent: The account or property that all user links in the request 4336// are for. The parent of all values for user link names to delete 4337// must match this field. Example format: accounts/1234. 4338func (r *AccountsUserLinksService) BatchDelete(parent string, googleanalyticsadminv1alphabatchdeleteuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest) *AccountsUserLinksBatchDeleteCall { 4339 c := &AccountsUserLinksBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4340 c.parent = parent 4341 c.googleanalyticsadminv1alphabatchdeleteuserlinksrequest = googleanalyticsadminv1alphabatchdeleteuserlinksrequest 4342 return c 4343} 4344 4345// Fields allows partial responses to be retrieved. See 4346// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4347// for more information. 4348func (c *AccountsUserLinksBatchDeleteCall) Fields(s ...googleapi.Field) *AccountsUserLinksBatchDeleteCall { 4349 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4350 return c 4351} 4352 4353// Context sets the context to be used in this call's Do method. Any 4354// pending HTTP request will be aborted if the provided context is 4355// canceled. 4356func (c *AccountsUserLinksBatchDeleteCall) Context(ctx context.Context) *AccountsUserLinksBatchDeleteCall { 4357 c.ctx_ = ctx 4358 return c 4359} 4360 4361// Header returns an http.Header that can be modified by the caller to 4362// add HTTP headers to the request. 4363func (c *AccountsUserLinksBatchDeleteCall) Header() http.Header { 4364 if c.header_ == nil { 4365 c.header_ = make(http.Header) 4366 } 4367 return c.header_ 4368} 4369 4370func (c *AccountsUserLinksBatchDeleteCall) doRequest(alt string) (*http.Response, error) { 4371 reqHeaders := make(http.Header) 4372 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 4373 for k, v := range c.header_ { 4374 reqHeaders[k] = v 4375 } 4376 reqHeaders.Set("User-Agent", c.s.userAgent()) 4377 var body io.Reader = nil 4378 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphabatchdeleteuserlinksrequest) 4379 if err != nil { 4380 return nil, err 4381 } 4382 reqHeaders.Set("Content-Type", "application/json") 4383 c.urlParams_.Set("alt", alt) 4384 c.urlParams_.Set("prettyPrint", "false") 4385 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:batchDelete") 4386 urls += "?" + c.urlParams_.Encode() 4387 req, err := http.NewRequest("POST", urls, body) 4388 if err != nil { 4389 return nil, err 4390 } 4391 req.Header = reqHeaders 4392 googleapi.Expand(req.URL, map[string]string{ 4393 "parent": c.parent, 4394 }) 4395 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4396} 4397 4398// Do executes the "analyticsadmin.accounts.userLinks.batchDelete" call. 4399// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 4400// non-2xx status code is an error. Response headers are in either 4401// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 4402// returned at all) in error.(*googleapi.Error).Header. Use 4403// googleapi.IsNotModified to check whether the returned error was 4404// because http.StatusNotModified was returned. 4405func (c *AccountsUserLinksBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 4406 gensupport.SetOptions(c.urlParams_, opts...) 4407 res, err := c.doRequest("json") 4408 if res != nil && res.StatusCode == http.StatusNotModified { 4409 if res.Body != nil { 4410 res.Body.Close() 4411 } 4412 return nil, &googleapi.Error{ 4413 Code: res.StatusCode, 4414 Header: res.Header, 4415 } 4416 } 4417 if err != nil { 4418 return nil, err 4419 } 4420 defer googleapi.CloseBody(res) 4421 if err := googleapi.CheckResponse(res); err != nil { 4422 return nil, err 4423 } 4424 ret := &GoogleProtobufEmpty{ 4425 ServerResponse: googleapi.ServerResponse{ 4426 Header: res.Header, 4427 HTTPStatusCode: res.StatusCode, 4428 }, 4429 } 4430 target := &ret 4431 if err := gensupport.DecodeResponse(target, res); err != nil { 4432 return nil, err 4433 } 4434 return ret, nil 4435 // { 4436 // "description": "Deletes information about multiple users' links to an account or property.", 4437 // "flatPath": "v1alpha/accounts/{accountsId}/userLinks:batchDelete", 4438 // "httpMethod": "POST", 4439 // "id": "analyticsadmin.accounts.userLinks.batchDelete", 4440 // "parameterOrder": [ 4441 // "parent" 4442 // ], 4443 // "parameters": { 4444 // "parent": { 4445 // "description": "Required. The account or property that all user links in the request are for. The parent of all values for user link names to delete must match this field. Example format: accounts/1234", 4446 // "location": "path", 4447 // "pattern": "^accounts/[^/]+$", 4448 // "required": true, 4449 // "type": "string" 4450 // } 4451 // }, 4452 // "path": "v1alpha/{+parent}/userLinks:batchDelete", 4453 // "request": { 4454 // "$ref": "GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest" 4455 // }, 4456 // "response": { 4457 // "$ref": "GoogleProtobufEmpty" 4458 // }, 4459 // "scopes": [ 4460 // "https://www.googleapis.com/auth/analytics.manage.users" 4461 // ] 4462 // } 4463 4464} 4465 4466// method id "analyticsadmin.accounts.userLinks.batchGet": 4467 4468type AccountsUserLinksBatchGetCall struct { 4469 s *Service 4470 parent string 4471 urlParams_ gensupport.URLParams 4472 ifNoneMatch_ string 4473 ctx_ context.Context 4474 header_ http.Header 4475} 4476 4477// BatchGet: Gets information about multiple users' links to an account 4478// or property. 4479// 4480// - parent: The account or property that all user links in the request 4481// are for. The parent of all provided values for the 'names' field 4482// must match this field. Example format: accounts/1234. 4483func (r *AccountsUserLinksService) BatchGet(parent string) *AccountsUserLinksBatchGetCall { 4484 c := &AccountsUserLinksBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4485 c.parent = parent 4486 return c 4487} 4488 4489// Names sets the optional parameter "names": Required. The names of the 4490// user links to retrieve. A maximum of 1000 user links can be retrieved 4491// in a batch. Format: accounts/{accountId}/userLinks/{userLinkId} 4492func (c *AccountsUserLinksBatchGetCall) Names(names ...string) *AccountsUserLinksBatchGetCall { 4493 c.urlParams_.SetMulti("names", append([]string{}, names...)) 4494 return c 4495} 4496 4497// Fields allows partial responses to be retrieved. See 4498// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4499// for more information. 4500func (c *AccountsUserLinksBatchGetCall) Fields(s ...googleapi.Field) *AccountsUserLinksBatchGetCall { 4501 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4502 return c 4503} 4504 4505// IfNoneMatch sets the optional parameter which makes the operation 4506// fail if the object's ETag matches the given value. This is useful for 4507// getting updates only after the object has changed since the last 4508// request. Use googleapi.IsNotModified to check whether the response 4509// error from Do is the result of In-None-Match. 4510func (c *AccountsUserLinksBatchGetCall) IfNoneMatch(entityTag string) *AccountsUserLinksBatchGetCall { 4511 c.ifNoneMatch_ = entityTag 4512 return c 4513} 4514 4515// Context sets the context to be used in this call's Do method. Any 4516// pending HTTP request will be aborted if the provided context is 4517// canceled. 4518func (c *AccountsUserLinksBatchGetCall) Context(ctx context.Context) *AccountsUserLinksBatchGetCall { 4519 c.ctx_ = ctx 4520 return c 4521} 4522 4523// Header returns an http.Header that can be modified by the caller to 4524// add HTTP headers to the request. 4525func (c *AccountsUserLinksBatchGetCall) Header() http.Header { 4526 if c.header_ == nil { 4527 c.header_ = make(http.Header) 4528 } 4529 return c.header_ 4530} 4531 4532func (c *AccountsUserLinksBatchGetCall) doRequest(alt string) (*http.Response, error) { 4533 reqHeaders := make(http.Header) 4534 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 4535 for k, v := range c.header_ { 4536 reqHeaders[k] = v 4537 } 4538 reqHeaders.Set("User-Agent", c.s.userAgent()) 4539 if c.ifNoneMatch_ != "" { 4540 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4541 } 4542 var body io.Reader = nil 4543 c.urlParams_.Set("alt", alt) 4544 c.urlParams_.Set("prettyPrint", "false") 4545 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:batchGet") 4546 urls += "?" + c.urlParams_.Encode() 4547 req, err := http.NewRequest("GET", urls, body) 4548 if err != nil { 4549 return nil, err 4550 } 4551 req.Header = reqHeaders 4552 googleapi.Expand(req.URL, map[string]string{ 4553 "parent": c.parent, 4554 }) 4555 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4556} 4557 4558// Do executes the "analyticsadmin.accounts.userLinks.batchGet" call. 4559// Exactly one of *GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse 4560// or error will be non-nil. Any non-2xx status code is an error. 4561// Response headers are in either 4562// *GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse.ServerResponse.H 4563// eader or (if a response was returned at all) in 4564// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4565// whether the returned error was because http.StatusNotModified was 4566// returned. 4567func (c *AccountsUserLinksBatchGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse, error) { 4568 gensupport.SetOptions(c.urlParams_, opts...) 4569 res, err := c.doRequest("json") 4570 if res != nil && res.StatusCode == http.StatusNotModified { 4571 if res.Body != nil { 4572 res.Body.Close() 4573 } 4574 return nil, &googleapi.Error{ 4575 Code: res.StatusCode, 4576 Header: res.Header, 4577 } 4578 } 4579 if err != nil { 4580 return nil, err 4581 } 4582 defer googleapi.CloseBody(res) 4583 if err := googleapi.CheckResponse(res); err != nil { 4584 return nil, err 4585 } 4586 ret := &GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse{ 4587 ServerResponse: googleapi.ServerResponse{ 4588 Header: res.Header, 4589 HTTPStatusCode: res.StatusCode, 4590 }, 4591 } 4592 target := &ret 4593 if err := gensupport.DecodeResponse(target, res); err != nil { 4594 return nil, err 4595 } 4596 return ret, nil 4597 // { 4598 // "description": "Gets information about multiple users' links to an account or property.", 4599 // "flatPath": "v1alpha/accounts/{accountsId}/userLinks:batchGet", 4600 // "httpMethod": "GET", 4601 // "id": "analyticsadmin.accounts.userLinks.batchGet", 4602 // "parameterOrder": [ 4603 // "parent" 4604 // ], 4605 // "parameters": { 4606 // "names": { 4607 // "description": "Required. The names of the user links to retrieve. A maximum of 1000 user links can be retrieved in a batch. Format: accounts/{accountId}/userLinks/{userLinkId}", 4608 // "location": "query", 4609 // "repeated": true, 4610 // "type": "string" 4611 // }, 4612 // "parent": { 4613 // "description": "Required. The account or property that all user links in the request are for. The parent of all provided values for the 'names' field must match this field. Example format: accounts/1234", 4614 // "location": "path", 4615 // "pattern": "^accounts/[^/]+$", 4616 // "required": true, 4617 // "type": "string" 4618 // } 4619 // }, 4620 // "path": "v1alpha/{+parent}/userLinks:batchGet", 4621 // "response": { 4622 // "$ref": "GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse" 4623 // }, 4624 // "scopes": [ 4625 // "https://www.googleapis.com/auth/analytics.manage.users", 4626 // "https://www.googleapis.com/auth/analytics.manage.users.readonly" 4627 // ] 4628 // } 4629 4630} 4631 4632// method id "analyticsadmin.accounts.userLinks.batchUpdate": 4633 4634type AccountsUserLinksBatchUpdateCall struct { 4635 s *Service 4636 parent string 4637 googleanalyticsadminv1alphabatchupdateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest 4638 urlParams_ gensupport.URLParams 4639 ctx_ context.Context 4640 header_ http.Header 4641} 4642 4643// BatchUpdate: Updates information about multiple users' links to an 4644// account or property. 4645// 4646// - parent: The account or property that all user links in the request 4647// are for. The parent field in the UpdateUserLinkRequest messages 4648// must either be empty or match this field. Example format: 4649// accounts/1234. 4650func (r *AccountsUserLinksService) BatchUpdate(parent string, googleanalyticsadminv1alphabatchupdateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest) *AccountsUserLinksBatchUpdateCall { 4651 c := &AccountsUserLinksBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4652 c.parent = parent 4653 c.googleanalyticsadminv1alphabatchupdateuserlinksrequest = googleanalyticsadminv1alphabatchupdateuserlinksrequest 4654 return c 4655} 4656 4657// Fields allows partial responses to be retrieved. See 4658// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4659// for more information. 4660func (c *AccountsUserLinksBatchUpdateCall) Fields(s ...googleapi.Field) *AccountsUserLinksBatchUpdateCall { 4661 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4662 return c 4663} 4664 4665// Context sets the context to be used in this call's Do method. Any 4666// pending HTTP request will be aborted if the provided context is 4667// canceled. 4668func (c *AccountsUserLinksBatchUpdateCall) Context(ctx context.Context) *AccountsUserLinksBatchUpdateCall { 4669 c.ctx_ = ctx 4670 return c 4671} 4672 4673// Header returns an http.Header that can be modified by the caller to 4674// add HTTP headers to the request. 4675func (c *AccountsUserLinksBatchUpdateCall) Header() http.Header { 4676 if c.header_ == nil { 4677 c.header_ = make(http.Header) 4678 } 4679 return c.header_ 4680} 4681 4682func (c *AccountsUserLinksBatchUpdateCall) doRequest(alt string) (*http.Response, error) { 4683 reqHeaders := make(http.Header) 4684 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 4685 for k, v := range c.header_ { 4686 reqHeaders[k] = v 4687 } 4688 reqHeaders.Set("User-Agent", c.s.userAgent()) 4689 var body io.Reader = nil 4690 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphabatchupdateuserlinksrequest) 4691 if err != nil { 4692 return nil, err 4693 } 4694 reqHeaders.Set("Content-Type", "application/json") 4695 c.urlParams_.Set("alt", alt) 4696 c.urlParams_.Set("prettyPrint", "false") 4697 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:batchUpdate") 4698 urls += "?" + c.urlParams_.Encode() 4699 req, err := http.NewRequest("POST", urls, body) 4700 if err != nil { 4701 return nil, err 4702 } 4703 req.Header = reqHeaders 4704 googleapi.Expand(req.URL, map[string]string{ 4705 "parent": c.parent, 4706 }) 4707 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4708} 4709 4710// Do executes the "analyticsadmin.accounts.userLinks.batchUpdate" call. 4711// Exactly one of 4712// *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse or error 4713// will be non-nil. Any non-2xx status code is an error. Response 4714// headers are in either 4715// *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse.ServerRespons 4716// e.Header or (if a response was returned at all) in 4717// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4718// whether the returned error was because http.StatusNotModified was 4719// returned. 4720func (c *AccountsUserLinksBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse, error) { 4721 gensupport.SetOptions(c.urlParams_, opts...) 4722 res, err := c.doRequest("json") 4723 if res != nil && res.StatusCode == http.StatusNotModified { 4724 if res.Body != nil { 4725 res.Body.Close() 4726 } 4727 return nil, &googleapi.Error{ 4728 Code: res.StatusCode, 4729 Header: res.Header, 4730 } 4731 } 4732 if err != nil { 4733 return nil, err 4734 } 4735 defer googleapi.CloseBody(res) 4736 if err := googleapi.CheckResponse(res); err != nil { 4737 return nil, err 4738 } 4739 ret := &GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse{ 4740 ServerResponse: googleapi.ServerResponse{ 4741 Header: res.Header, 4742 HTTPStatusCode: res.StatusCode, 4743 }, 4744 } 4745 target := &ret 4746 if err := gensupport.DecodeResponse(target, res); err != nil { 4747 return nil, err 4748 } 4749 return ret, nil 4750 // { 4751 // "description": "Updates information about multiple users' links to an account or property.", 4752 // "flatPath": "v1alpha/accounts/{accountsId}/userLinks:batchUpdate", 4753 // "httpMethod": "POST", 4754 // "id": "analyticsadmin.accounts.userLinks.batchUpdate", 4755 // "parameterOrder": [ 4756 // "parent" 4757 // ], 4758 // "parameters": { 4759 // "parent": { 4760 // "description": "Required. The account or property that all user links in the request are for. The parent field in the UpdateUserLinkRequest messages must either be empty or match this field. Example format: accounts/1234", 4761 // "location": "path", 4762 // "pattern": "^accounts/[^/]+$", 4763 // "required": true, 4764 // "type": "string" 4765 // } 4766 // }, 4767 // "path": "v1alpha/{+parent}/userLinks:batchUpdate", 4768 // "request": { 4769 // "$ref": "GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest" 4770 // }, 4771 // "response": { 4772 // "$ref": "GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse" 4773 // }, 4774 // "scopes": [ 4775 // "https://www.googleapis.com/auth/analytics.manage.users" 4776 // ] 4777 // } 4778 4779} 4780 4781// method id "analyticsadmin.accounts.userLinks.create": 4782 4783type AccountsUserLinksCreateCall struct { 4784 s *Service 4785 parent string 4786 googleanalyticsadminv1alphauserlink *GoogleAnalyticsAdminV1alphaUserLink 4787 urlParams_ gensupport.URLParams 4788 ctx_ context.Context 4789 header_ http.Header 4790} 4791 4792// Create: Creates a user link on an account or property. If the user 4793// with the specified email already has permissions on the account or 4794// property, then the user's existing permissions will be unioned with 4795// the permissions specified in the new UserLink. 4796// 4797// - parent: Example format: accounts/1234. 4798func (r *AccountsUserLinksService) Create(parent string, googleanalyticsadminv1alphauserlink *GoogleAnalyticsAdminV1alphaUserLink) *AccountsUserLinksCreateCall { 4799 c := &AccountsUserLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4800 c.parent = parent 4801 c.googleanalyticsadminv1alphauserlink = googleanalyticsadminv1alphauserlink 4802 return c 4803} 4804 4805// NotifyNewUser sets the optional parameter "notifyNewUser": If set, 4806// then email the new user notifying them that they've been granted 4807// permissions to the resource. 4808func (c *AccountsUserLinksCreateCall) NotifyNewUser(notifyNewUser bool) *AccountsUserLinksCreateCall { 4809 c.urlParams_.Set("notifyNewUser", fmt.Sprint(notifyNewUser)) 4810 return c 4811} 4812 4813// Fields allows partial responses to be retrieved. See 4814// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4815// for more information. 4816func (c *AccountsUserLinksCreateCall) Fields(s ...googleapi.Field) *AccountsUserLinksCreateCall { 4817 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4818 return c 4819} 4820 4821// Context sets the context to be used in this call's Do method. Any 4822// pending HTTP request will be aborted if the provided context is 4823// canceled. 4824func (c *AccountsUserLinksCreateCall) Context(ctx context.Context) *AccountsUserLinksCreateCall { 4825 c.ctx_ = ctx 4826 return c 4827} 4828 4829// Header returns an http.Header that can be modified by the caller to 4830// add HTTP headers to the request. 4831func (c *AccountsUserLinksCreateCall) Header() http.Header { 4832 if c.header_ == nil { 4833 c.header_ = make(http.Header) 4834 } 4835 return c.header_ 4836} 4837 4838func (c *AccountsUserLinksCreateCall) doRequest(alt string) (*http.Response, error) { 4839 reqHeaders := make(http.Header) 4840 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 4841 for k, v := range c.header_ { 4842 reqHeaders[k] = v 4843 } 4844 reqHeaders.Set("User-Agent", c.s.userAgent()) 4845 var body io.Reader = nil 4846 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphauserlink) 4847 if err != nil { 4848 return nil, err 4849 } 4850 reqHeaders.Set("Content-Type", "application/json") 4851 c.urlParams_.Set("alt", alt) 4852 c.urlParams_.Set("prettyPrint", "false") 4853 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks") 4854 urls += "?" + c.urlParams_.Encode() 4855 req, err := http.NewRequest("POST", urls, body) 4856 if err != nil { 4857 return nil, err 4858 } 4859 req.Header = reqHeaders 4860 googleapi.Expand(req.URL, map[string]string{ 4861 "parent": c.parent, 4862 }) 4863 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4864} 4865 4866// Do executes the "analyticsadmin.accounts.userLinks.create" call. 4867// Exactly one of *GoogleAnalyticsAdminV1alphaUserLink or error will be 4868// non-nil. Any non-2xx status code is an error. Response headers are in 4869// either *GoogleAnalyticsAdminV1alphaUserLink.ServerResponse.Header or 4870// (if a response was returned at all) in 4871// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4872// whether the returned error was because http.StatusNotModified was 4873// returned. 4874func (c *AccountsUserLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaUserLink, error) { 4875 gensupport.SetOptions(c.urlParams_, opts...) 4876 res, err := c.doRequest("json") 4877 if res != nil && res.StatusCode == http.StatusNotModified { 4878 if res.Body != nil { 4879 res.Body.Close() 4880 } 4881 return nil, &googleapi.Error{ 4882 Code: res.StatusCode, 4883 Header: res.Header, 4884 } 4885 } 4886 if err != nil { 4887 return nil, err 4888 } 4889 defer googleapi.CloseBody(res) 4890 if err := googleapi.CheckResponse(res); err != nil { 4891 return nil, err 4892 } 4893 ret := &GoogleAnalyticsAdminV1alphaUserLink{ 4894 ServerResponse: googleapi.ServerResponse{ 4895 Header: res.Header, 4896 HTTPStatusCode: res.StatusCode, 4897 }, 4898 } 4899 target := &ret 4900 if err := gensupport.DecodeResponse(target, res); err != nil { 4901 return nil, err 4902 } 4903 return ret, nil 4904 // { 4905 // "description": "Creates a user link on an account or property. If the user with the specified email already has permissions on the account or property, then the user's existing permissions will be unioned with the permissions specified in the new UserLink.", 4906 // "flatPath": "v1alpha/accounts/{accountsId}/userLinks", 4907 // "httpMethod": "POST", 4908 // "id": "analyticsadmin.accounts.userLinks.create", 4909 // "parameterOrder": [ 4910 // "parent" 4911 // ], 4912 // "parameters": { 4913 // "notifyNewUser": { 4914 // "description": "Optional. If set, then email the new user notifying them that they've been granted permissions to the resource.", 4915 // "location": "query", 4916 // "type": "boolean" 4917 // }, 4918 // "parent": { 4919 // "description": "Required. Example format: accounts/1234", 4920 // "location": "path", 4921 // "pattern": "^accounts/[^/]+$", 4922 // "required": true, 4923 // "type": "string" 4924 // } 4925 // }, 4926 // "path": "v1alpha/{+parent}/userLinks", 4927 // "request": { 4928 // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" 4929 // }, 4930 // "response": { 4931 // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" 4932 // }, 4933 // "scopes": [ 4934 // "https://www.googleapis.com/auth/analytics.manage.users" 4935 // ] 4936 // } 4937 4938} 4939 4940// method id "analyticsadmin.accounts.userLinks.delete": 4941 4942type AccountsUserLinksDeleteCall struct { 4943 s *Service 4944 name string 4945 urlParams_ gensupport.URLParams 4946 ctx_ context.Context 4947 header_ http.Header 4948} 4949 4950// Delete: Deletes a user link on an account or property. 4951// 4952// - name: Example format: accounts/1234/userLinks/5678. 4953func (r *AccountsUserLinksService) Delete(name string) *AccountsUserLinksDeleteCall { 4954 c := &AccountsUserLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4955 c.name = name 4956 return c 4957} 4958 4959// Fields allows partial responses to be retrieved. See 4960// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4961// for more information. 4962func (c *AccountsUserLinksDeleteCall) Fields(s ...googleapi.Field) *AccountsUserLinksDeleteCall { 4963 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4964 return c 4965} 4966 4967// Context sets the context to be used in this call's Do method. Any 4968// pending HTTP request will be aborted if the provided context is 4969// canceled. 4970func (c *AccountsUserLinksDeleteCall) Context(ctx context.Context) *AccountsUserLinksDeleteCall { 4971 c.ctx_ = ctx 4972 return c 4973} 4974 4975// Header returns an http.Header that can be modified by the caller to 4976// add HTTP headers to the request. 4977func (c *AccountsUserLinksDeleteCall) Header() http.Header { 4978 if c.header_ == nil { 4979 c.header_ = make(http.Header) 4980 } 4981 return c.header_ 4982} 4983 4984func (c *AccountsUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) { 4985 reqHeaders := make(http.Header) 4986 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 4987 for k, v := range c.header_ { 4988 reqHeaders[k] = v 4989 } 4990 reqHeaders.Set("User-Agent", c.s.userAgent()) 4991 var body io.Reader = nil 4992 c.urlParams_.Set("alt", alt) 4993 c.urlParams_.Set("prettyPrint", "false") 4994 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 4995 urls += "?" + c.urlParams_.Encode() 4996 req, err := http.NewRequest("DELETE", urls, body) 4997 if err != nil { 4998 return nil, err 4999 } 5000 req.Header = reqHeaders 5001 googleapi.Expand(req.URL, map[string]string{ 5002 "name": c.name, 5003 }) 5004 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5005} 5006 5007// Do executes the "analyticsadmin.accounts.userLinks.delete" call. 5008// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 5009// non-2xx status code is an error. Response headers are in either 5010// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 5011// returned at all) in error.(*googleapi.Error).Header. Use 5012// googleapi.IsNotModified to check whether the returned error was 5013// because http.StatusNotModified was returned. 5014func (c *AccountsUserLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 5015 gensupport.SetOptions(c.urlParams_, opts...) 5016 res, err := c.doRequest("json") 5017 if res != nil && res.StatusCode == http.StatusNotModified { 5018 if res.Body != nil { 5019 res.Body.Close() 5020 } 5021 return nil, &googleapi.Error{ 5022 Code: res.StatusCode, 5023 Header: res.Header, 5024 } 5025 } 5026 if err != nil { 5027 return nil, err 5028 } 5029 defer googleapi.CloseBody(res) 5030 if err := googleapi.CheckResponse(res); err != nil { 5031 return nil, err 5032 } 5033 ret := &GoogleProtobufEmpty{ 5034 ServerResponse: googleapi.ServerResponse{ 5035 Header: res.Header, 5036 HTTPStatusCode: res.StatusCode, 5037 }, 5038 } 5039 target := &ret 5040 if err := gensupport.DecodeResponse(target, res); err != nil { 5041 return nil, err 5042 } 5043 return ret, nil 5044 // { 5045 // "description": "Deletes a user link on an account or property.", 5046 // "flatPath": "v1alpha/accounts/{accountsId}/userLinks/{userLinksId}", 5047 // "httpMethod": "DELETE", 5048 // "id": "analyticsadmin.accounts.userLinks.delete", 5049 // "parameterOrder": [ 5050 // "name" 5051 // ], 5052 // "parameters": { 5053 // "name": { 5054 // "description": "Required. Example format: accounts/1234/userLinks/5678", 5055 // "location": "path", 5056 // "pattern": "^accounts/[^/]+/userLinks/[^/]+$", 5057 // "required": true, 5058 // "type": "string" 5059 // } 5060 // }, 5061 // "path": "v1alpha/{+name}", 5062 // "response": { 5063 // "$ref": "GoogleProtobufEmpty" 5064 // }, 5065 // "scopes": [ 5066 // "https://www.googleapis.com/auth/analytics.manage.users" 5067 // ] 5068 // } 5069 5070} 5071 5072// method id "analyticsadmin.accounts.userLinks.get": 5073 5074type AccountsUserLinksGetCall struct { 5075 s *Service 5076 name string 5077 urlParams_ gensupport.URLParams 5078 ifNoneMatch_ string 5079 ctx_ context.Context 5080 header_ http.Header 5081} 5082 5083// Get: Gets information about a user's link to an account or property. 5084// 5085// - name: Example format: accounts/1234/userLinks/5678. 5086func (r *AccountsUserLinksService) Get(name string) *AccountsUserLinksGetCall { 5087 c := &AccountsUserLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5088 c.name = name 5089 return c 5090} 5091 5092// Fields allows partial responses to be retrieved. See 5093// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5094// for more information. 5095func (c *AccountsUserLinksGetCall) Fields(s ...googleapi.Field) *AccountsUserLinksGetCall { 5096 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5097 return c 5098} 5099 5100// IfNoneMatch sets the optional parameter which makes the operation 5101// fail if the object's ETag matches the given value. This is useful for 5102// getting updates only after the object has changed since the last 5103// request. Use googleapi.IsNotModified to check whether the response 5104// error from Do is the result of In-None-Match. 5105func (c *AccountsUserLinksGetCall) IfNoneMatch(entityTag string) *AccountsUserLinksGetCall { 5106 c.ifNoneMatch_ = entityTag 5107 return c 5108} 5109 5110// Context sets the context to be used in this call's Do method. Any 5111// pending HTTP request will be aborted if the provided context is 5112// canceled. 5113func (c *AccountsUserLinksGetCall) Context(ctx context.Context) *AccountsUserLinksGetCall { 5114 c.ctx_ = ctx 5115 return c 5116} 5117 5118// Header returns an http.Header that can be modified by the caller to 5119// add HTTP headers to the request. 5120func (c *AccountsUserLinksGetCall) Header() http.Header { 5121 if c.header_ == nil { 5122 c.header_ = make(http.Header) 5123 } 5124 return c.header_ 5125} 5126 5127func (c *AccountsUserLinksGetCall) doRequest(alt string) (*http.Response, error) { 5128 reqHeaders := make(http.Header) 5129 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5130 for k, v := range c.header_ { 5131 reqHeaders[k] = v 5132 } 5133 reqHeaders.Set("User-Agent", c.s.userAgent()) 5134 if c.ifNoneMatch_ != "" { 5135 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5136 } 5137 var body io.Reader = nil 5138 c.urlParams_.Set("alt", alt) 5139 c.urlParams_.Set("prettyPrint", "false") 5140 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 5141 urls += "?" + c.urlParams_.Encode() 5142 req, err := http.NewRequest("GET", urls, body) 5143 if err != nil { 5144 return nil, err 5145 } 5146 req.Header = reqHeaders 5147 googleapi.Expand(req.URL, map[string]string{ 5148 "name": c.name, 5149 }) 5150 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5151} 5152 5153// Do executes the "analyticsadmin.accounts.userLinks.get" call. 5154// Exactly one of *GoogleAnalyticsAdminV1alphaUserLink or error will be 5155// non-nil. Any non-2xx status code is an error. Response headers are in 5156// either *GoogleAnalyticsAdminV1alphaUserLink.ServerResponse.Header or 5157// (if a response was returned at all) in 5158// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 5159// whether the returned error was because http.StatusNotModified was 5160// returned. 5161func (c *AccountsUserLinksGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaUserLink, error) { 5162 gensupport.SetOptions(c.urlParams_, opts...) 5163 res, err := c.doRequest("json") 5164 if res != nil && res.StatusCode == http.StatusNotModified { 5165 if res.Body != nil { 5166 res.Body.Close() 5167 } 5168 return nil, &googleapi.Error{ 5169 Code: res.StatusCode, 5170 Header: res.Header, 5171 } 5172 } 5173 if err != nil { 5174 return nil, err 5175 } 5176 defer googleapi.CloseBody(res) 5177 if err := googleapi.CheckResponse(res); err != nil { 5178 return nil, err 5179 } 5180 ret := &GoogleAnalyticsAdminV1alphaUserLink{ 5181 ServerResponse: googleapi.ServerResponse{ 5182 Header: res.Header, 5183 HTTPStatusCode: res.StatusCode, 5184 }, 5185 } 5186 target := &ret 5187 if err := gensupport.DecodeResponse(target, res); err != nil { 5188 return nil, err 5189 } 5190 return ret, nil 5191 // { 5192 // "description": "Gets information about a user's link to an account or property.", 5193 // "flatPath": "v1alpha/accounts/{accountsId}/userLinks/{userLinksId}", 5194 // "httpMethod": "GET", 5195 // "id": "analyticsadmin.accounts.userLinks.get", 5196 // "parameterOrder": [ 5197 // "name" 5198 // ], 5199 // "parameters": { 5200 // "name": { 5201 // "description": "Required. Example format: accounts/1234/userLinks/5678", 5202 // "location": "path", 5203 // "pattern": "^accounts/[^/]+/userLinks/[^/]+$", 5204 // "required": true, 5205 // "type": "string" 5206 // } 5207 // }, 5208 // "path": "v1alpha/{+name}", 5209 // "response": { 5210 // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" 5211 // }, 5212 // "scopes": [ 5213 // "https://www.googleapis.com/auth/analytics.manage.users", 5214 // "https://www.googleapis.com/auth/analytics.manage.users.readonly" 5215 // ] 5216 // } 5217 5218} 5219 5220// method id "analyticsadmin.accounts.userLinks.list": 5221 5222type AccountsUserLinksListCall struct { 5223 s *Service 5224 parent string 5225 urlParams_ gensupport.URLParams 5226 ifNoneMatch_ string 5227 ctx_ context.Context 5228 header_ http.Header 5229} 5230 5231// List: Lists all user links on an account or property. 5232// 5233// - parent: Example format: accounts/1234. 5234func (r *AccountsUserLinksService) List(parent string) *AccountsUserLinksListCall { 5235 c := &AccountsUserLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5236 c.parent = parent 5237 return c 5238} 5239 5240// PageSize sets the optional parameter "pageSize": The maximum number 5241// of user links to return. The service may return fewer than this 5242// value. If unspecified, at most 200 user links will be returned. The 5243// maximum value is 500; values above 500 will be coerced to 500. 5244func (c *AccountsUserLinksListCall) PageSize(pageSize int64) *AccountsUserLinksListCall { 5245 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5246 return c 5247} 5248 5249// PageToken sets the optional parameter "pageToken": A page token, 5250// received from a previous `ListUserLinks` call. Provide this to 5251// retrieve the subsequent page. When paginating, all other parameters 5252// provided to `ListUserLinks` must match the call that provided the 5253// page token. 5254func (c *AccountsUserLinksListCall) PageToken(pageToken string) *AccountsUserLinksListCall { 5255 c.urlParams_.Set("pageToken", pageToken) 5256 return c 5257} 5258 5259// Fields allows partial responses to be retrieved. See 5260// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5261// for more information. 5262func (c *AccountsUserLinksListCall) Fields(s ...googleapi.Field) *AccountsUserLinksListCall { 5263 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5264 return c 5265} 5266 5267// IfNoneMatch sets the optional parameter which makes the operation 5268// fail if the object's ETag matches the given value. This is useful for 5269// getting updates only after the object has changed since the last 5270// request. Use googleapi.IsNotModified to check whether the response 5271// error from Do is the result of In-None-Match. 5272func (c *AccountsUserLinksListCall) IfNoneMatch(entityTag string) *AccountsUserLinksListCall { 5273 c.ifNoneMatch_ = entityTag 5274 return c 5275} 5276 5277// Context sets the context to be used in this call's Do method. Any 5278// pending HTTP request will be aborted if the provided context is 5279// canceled. 5280func (c *AccountsUserLinksListCall) Context(ctx context.Context) *AccountsUserLinksListCall { 5281 c.ctx_ = ctx 5282 return c 5283} 5284 5285// Header returns an http.Header that can be modified by the caller to 5286// add HTTP headers to the request. 5287func (c *AccountsUserLinksListCall) Header() http.Header { 5288 if c.header_ == nil { 5289 c.header_ = make(http.Header) 5290 } 5291 return c.header_ 5292} 5293 5294func (c *AccountsUserLinksListCall) doRequest(alt string) (*http.Response, error) { 5295 reqHeaders := make(http.Header) 5296 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5297 for k, v := range c.header_ { 5298 reqHeaders[k] = v 5299 } 5300 reqHeaders.Set("User-Agent", c.s.userAgent()) 5301 if c.ifNoneMatch_ != "" { 5302 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5303 } 5304 var body io.Reader = nil 5305 c.urlParams_.Set("alt", alt) 5306 c.urlParams_.Set("prettyPrint", "false") 5307 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks") 5308 urls += "?" + c.urlParams_.Encode() 5309 req, err := http.NewRequest("GET", urls, body) 5310 if err != nil { 5311 return nil, err 5312 } 5313 req.Header = reqHeaders 5314 googleapi.Expand(req.URL, map[string]string{ 5315 "parent": c.parent, 5316 }) 5317 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5318} 5319 5320// Do executes the "analyticsadmin.accounts.userLinks.list" call. 5321// Exactly one of *GoogleAnalyticsAdminV1alphaListUserLinksResponse or 5322// error will be non-nil. Any non-2xx status code is an error. Response 5323// headers are in either 5324// *GoogleAnalyticsAdminV1alphaListUserLinksResponse.ServerResponse.Heade 5325// r or (if a response was returned at all) in 5326// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 5327// whether the returned error was because http.StatusNotModified was 5328// returned. 5329func (c *AccountsUserLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListUserLinksResponse, error) { 5330 gensupport.SetOptions(c.urlParams_, opts...) 5331 res, err := c.doRequest("json") 5332 if res != nil && res.StatusCode == http.StatusNotModified { 5333 if res.Body != nil { 5334 res.Body.Close() 5335 } 5336 return nil, &googleapi.Error{ 5337 Code: res.StatusCode, 5338 Header: res.Header, 5339 } 5340 } 5341 if err != nil { 5342 return nil, err 5343 } 5344 defer googleapi.CloseBody(res) 5345 if err := googleapi.CheckResponse(res); err != nil { 5346 return nil, err 5347 } 5348 ret := &GoogleAnalyticsAdminV1alphaListUserLinksResponse{ 5349 ServerResponse: googleapi.ServerResponse{ 5350 Header: res.Header, 5351 HTTPStatusCode: res.StatusCode, 5352 }, 5353 } 5354 target := &ret 5355 if err := gensupport.DecodeResponse(target, res); err != nil { 5356 return nil, err 5357 } 5358 return ret, nil 5359 // { 5360 // "description": "Lists all user links on an account or property.", 5361 // "flatPath": "v1alpha/accounts/{accountsId}/userLinks", 5362 // "httpMethod": "GET", 5363 // "id": "analyticsadmin.accounts.userLinks.list", 5364 // "parameterOrder": [ 5365 // "parent" 5366 // ], 5367 // "parameters": { 5368 // "pageSize": { 5369 // "description": "The maximum number of user links to return. The service may return fewer than this value. If unspecified, at most 200 user links will be returned. The maximum value is 500; values above 500 will be coerced to 500.", 5370 // "format": "int32", 5371 // "location": "query", 5372 // "type": "integer" 5373 // }, 5374 // "pageToken": { 5375 // "description": "A page token, received from a previous `ListUserLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListUserLinks` must match the call that provided the page token.", 5376 // "location": "query", 5377 // "type": "string" 5378 // }, 5379 // "parent": { 5380 // "description": "Required. Example format: accounts/1234", 5381 // "location": "path", 5382 // "pattern": "^accounts/[^/]+$", 5383 // "required": true, 5384 // "type": "string" 5385 // } 5386 // }, 5387 // "path": "v1alpha/{+parent}/userLinks", 5388 // "response": { 5389 // "$ref": "GoogleAnalyticsAdminV1alphaListUserLinksResponse" 5390 // }, 5391 // "scopes": [ 5392 // "https://www.googleapis.com/auth/analytics.manage.users", 5393 // "https://www.googleapis.com/auth/analytics.manage.users.readonly" 5394 // ] 5395 // } 5396 5397} 5398 5399// Pages invokes f for each page of results. 5400// A non-nil error returned from f will halt the iteration. 5401// The provided context supersedes any context provided to the Context method. 5402func (c *AccountsUserLinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListUserLinksResponse) error) error { 5403 c.ctx_ = ctx 5404 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5405 for { 5406 x, err := c.Do() 5407 if err != nil { 5408 return err 5409 } 5410 if err := f(x); err != nil { 5411 return err 5412 } 5413 if x.NextPageToken == "" { 5414 return nil 5415 } 5416 c.PageToken(x.NextPageToken) 5417 } 5418} 5419 5420// method id "analyticsadmin.accounts.userLinks.patch": 5421 5422type AccountsUserLinksPatchCall struct { 5423 s *Service 5424 name string 5425 googleanalyticsadminv1alphauserlink *GoogleAnalyticsAdminV1alphaUserLink 5426 urlParams_ gensupport.URLParams 5427 ctx_ context.Context 5428 header_ http.Header 5429} 5430 5431// Patch: Updates a user link on an account or property. 5432// 5433// - name: Output only. Example format: properties/1234/userLinks/5678. 5434func (r *AccountsUserLinksService) Patch(name string, googleanalyticsadminv1alphauserlink *GoogleAnalyticsAdminV1alphaUserLink) *AccountsUserLinksPatchCall { 5435 c := &AccountsUserLinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5436 c.name = name 5437 c.googleanalyticsadminv1alphauserlink = googleanalyticsadminv1alphauserlink 5438 return c 5439} 5440 5441// Fields allows partial responses to be retrieved. See 5442// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5443// for more information. 5444func (c *AccountsUserLinksPatchCall) Fields(s ...googleapi.Field) *AccountsUserLinksPatchCall { 5445 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5446 return c 5447} 5448 5449// Context sets the context to be used in this call's Do method. Any 5450// pending HTTP request will be aborted if the provided context is 5451// canceled. 5452func (c *AccountsUserLinksPatchCall) Context(ctx context.Context) *AccountsUserLinksPatchCall { 5453 c.ctx_ = ctx 5454 return c 5455} 5456 5457// Header returns an http.Header that can be modified by the caller to 5458// add HTTP headers to the request. 5459func (c *AccountsUserLinksPatchCall) Header() http.Header { 5460 if c.header_ == nil { 5461 c.header_ = make(http.Header) 5462 } 5463 return c.header_ 5464} 5465 5466func (c *AccountsUserLinksPatchCall) doRequest(alt string) (*http.Response, error) { 5467 reqHeaders := make(http.Header) 5468 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5469 for k, v := range c.header_ { 5470 reqHeaders[k] = v 5471 } 5472 reqHeaders.Set("User-Agent", c.s.userAgent()) 5473 var body io.Reader = nil 5474 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphauserlink) 5475 if err != nil { 5476 return nil, err 5477 } 5478 reqHeaders.Set("Content-Type", "application/json") 5479 c.urlParams_.Set("alt", alt) 5480 c.urlParams_.Set("prettyPrint", "false") 5481 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 5482 urls += "?" + c.urlParams_.Encode() 5483 req, err := http.NewRequest("PATCH", urls, body) 5484 if err != nil { 5485 return nil, err 5486 } 5487 req.Header = reqHeaders 5488 googleapi.Expand(req.URL, map[string]string{ 5489 "name": c.name, 5490 }) 5491 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5492} 5493 5494// Do executes the "analyticsadmin.accounts.userLinks.patch" call. 5495// Exactly one of *GoogleAnalyticsAdminV1alphaUserLink or error will be 5496// non-nil. Any non-2xx status code is an error. Response headers are in 5497// either *GoogleAnalyticsAdminV1alphaUserLink.ServerResponse.Header or 5498// (if a response was returned at all) in 5499// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 5500// whether the returned error was because http.StatusNotModified was 5501// returned. 5502func (c *AccountsUserLinksPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaUserLink, error) { 5503 gensupport.SetOptions(c.urlParams_, opts...) 5504 res, err := c.doRequest("json") 5505 if res != nil && res.StatusCode == http.StatusNotModified { 5506 if res.Body != nil { 5507 res.Body.Close() 5508 } 5509 return nil, &googleapi.Error{ 5510 Code: res.StatusCode, 5511 Header: res.Header, 5512 } 5513 } 5514 if err != nil { 5515 return nil, err 5516 } 5517 defer googleapi.CloseBody(res) 5518 if err := googleapi.CheckResponse(res); err != nil { 5519 return nil, err 5520 } 5521 ret := &GoogleAnalyticsAdminV1alphaUserLink{ 5522 ServerResponse: googleapi.ServerResponse{ 5523 Header: res.Header, 5524 HTTPStatusCode: res.StatusCode, 5525 }, 5526 } 5527 target := &ret 5528 if err := gensupport.DecodeResponse(target, res); err != nil { 5529 return nil, err 5530 } 5531 return ret, nil 5532 // { 5533 // "description": "Updates a user link on an account or property.", 5534 // "flatPath": "v1alpha/accounts/{accountsId}/userLinks/{userLinksId}", 5535 // "httpMethod": "PATCH", 5536 // "id": "analyticsadmin.accounts.userLinks.patch", 5537 // "parameterOrder": [ 5538 // "name" 5539 // ], 5540 // "parameters": { 5541 // "name": { 5542 // "description": "Output only. Example format: properties/1234/userLinks/5678", 5543 // "location": "path", 5544 // "pattern": "^accounts/[^/]+/userLinks/[^/]+$", 5545 // "required": true, 5546 // "type": "string" 5547 // } 5548 // }, 5549 // "path": "v1alpha/{+name}", 5550 // "request": { 5551 // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" 5552 // }, 5553 // "response": { 5554 // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" 5555 // }, 5556 // "scopes": [ 5557 // "https://www.googleapis.com/auth/analytics.manage.users" 5558 // ] 5559 // } 5560 5561} 5562 5563// method id "analyticsadmin.properties.create": 5564 5565type PropertiesCreateCall struct { 5566 s *Service 5567 googleanalyticsadminv1alphaproperty *GoogleAnalyticsAdminV1alphaProperty 5568 urlParams_ gensupport.URLParams 5569 ctx_ context.Context 5570 header_ http.Header 5571} 5572 5573// Create: Creates an "GA4" property with the specified location and 5574// attributes. 5575func (r *PropertiesService) Create(googleanalyticsadminv1alphaproperty *GoogleAnalyticsAdminV1alphaProperty) *PropertiesCreateCall { 5576 c := &PropertiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5577 c.googleanalyticsadminv1alphaproperty = googleanalyticsadminv1alphaproperty 5578 return c 5579} 5580 5581// Fields allows partial responses to be retrieved. See 5582// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5583// for more information. 5584func (c *PropertiesCreateCall) Fields(s ...googleapi.Field) *PropertiesCreateCall { 5585 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5586 return c 5587} 5588 5589// Context sets the context to be used in this call's Do method. Any 5590// pending HTTP request will be aborted if the provided context is 5591// canceled. 5592func (c *PropertiesCreateCall) Context(ctx context.Context) *PropertiesCreateCall { 5593 c.ctx_ = ctx 5594 return c 5595} 5596 5597// Header returns an http.Header that can be modified by the caller to 5598// add HTTP headers to the request. 5599func (c *PropertiesCreateCall) Header() http.Header { 5600 if c.header_ == nil { 5601 c.header_ = make(http.Header) 5602 } 5603 return c.header_ 5604} 5605 5606func (c *PropertiesCreateCall) doRequest(alt string) (*http.Response, error) { 5607 reqHeaders := make(http.Header) 5608 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5609 for k, v := range c.header_ { 5610 reqHeaders[k] = v 5611 } 5612 reqHeaders.Set("User-Agent", c.s.userAgent()) 5613 var body io.Reader = nil 5614 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaproperty) 5615 if err != nil { 5616 return nil, err 5617 } 5618 reqHeaders.Set("Content-Type", "application/json") 5619 c.urlParams_.Set("alt", alt) 5620 c.urlParams_.Set("prettyPrint", "false") 5621 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/properties") 5622 urls += "?" + c.urlParams_.Encode() 5623 req, err := http.NewRequest("POST", urls, body) 5624 if err != nil { 5625 return nil, err 5626 } 5627 req.Header = reqHeaders 5628 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5629} 5630 5631// Do executes the "analyticsadmin.properties.create" call. 5632// Exactly one of *GoogleAnalyticsAdminV1alphaProperty or error will be 5633// non-nil. Any non-2xx status code is an error. Response headers are in 5634// either *GoogleAnalyticsAdminV1alphaProperty.ServerResponse.Header or 5635// (if a response was returned at all) in 5636// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 5637// whether the returned error was because http.StatusNotModified was 5638// returned. 5639func (c *PropertiesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaProperty, error) { 5640 gensupport.SetOptions(c.urlParams_, opts...) 5641 res, err := c.doRequest("json") 5642 if res != nil && res.StatusCode == http.StatusNotModified { 5643 if res.Body != nil { 5644 res.Body.Close() 5645 } 5646 return nil, &googleapi.Error{ 5647 Code: res.StatusCode, 5648 Header: res.Header, 5649 } 5650 } 5651 if err != nil { 5652 return nil, err 5653 } 5654 defer googleapi.CloseBody(res) 5655 if err := googleapi.CheckResponse(res); err != nil { 5656 return nil, err 5657 } 5658 ret := &GoogleAnalyticsAdminV1alphaProperty{ 5659 ServerResponse: googleapi.ServerResponse{ 5660 Header: res.Header, 5661 HTTPStatusCode: res.StatusCode, 5662 }, 5663 } 5664 target := &ret 5665 if err := gensupport.DecodeResponse(target, res); err != nil { 5666 return nil, err 5667 } 5668 return ret, nil 5669 // { 5670 // "description": "Creates an \"GA4\" property with the specified location and attributes.", 5671 // "flatPath": "v1alpha/properties", 5672 // "httpMethod": "POST", 5673 // "id": "analyticsadmin.properties.create", 5674 // "parameterOrder": [], 5675 // "parameters": {}, 5676 // "path": "v1alpha/properties", 5677 // "request": { 5678 // "$ref": "GoogleAnalyticsAdminV1alphaProperty" 5679 // }, 5680 // "response": { 5681 // "$ref": "GoogleAnalyticsAdminV1alphaProperty" 5682 // }, 5683 // "scopes": [ 5684 // "https://www.googleapis.com/auth/analytics.edit" 5685 // ] 5686 // } 5687 5688} 5689 5690// method id "analyticsadmin.properties.delete": 5691 5692type PropertiesDeleteCall struct { 5693 s *Service 5694 name string 5695 urlParams_ gensupport.URLParams 5696 ctx_ context.Context 5697 header_ http.Header 5698} 5699 5700// Delete: Marks target Property as soft-deleted (ie: "trashed") and 5701// returns it. This API does not have a method to restore soft-deleted 5702// properties. However, they can be restored using the Trash Can UI. If 5703// the properties are not restored before the expiration time, the 5704// Property and all child resources (eg: GoogleAdsLinks, Streams, 5705// UserLinks) will be permanently purged. 5706// https://support.google.com/analytics/answer/6154772 Returns an error 5707// if the target is not found, or is not an GA4 Property. 5708// 5709// - name: The name of the Property to soft-delete. Format: 5710// properties/{property_id} Example: "properties/1000". 5711func (r *PropertiesService) Delete(name string) *PropertiesDeleteCall { 5712 c := &PropertiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5713 c.name = name 5714 return c 5715} 5716 5717// Fields allows partial responses to be retrieved. See 5718// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5719// for more information. 5720func (c *PropertiesDeleteCall) Fields(s ...googleapi.Field) *PropertiesDeleteCall { 5721 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5722 return c 5723} 5724 5725// Context sets the context to be used in this call's Do method. Any 5726// pending HTTP request will be aborted if the provided context is 5727// canceled. 5728func (c *PropertiesDeleteCall) Context(ctx context.Context) *PropertiesDeleteCall { 5729 c.ctx_ = ctx 5730 return c 5731} 5732 5733// Header returns an http.Header that can be modified by the caller to 5734// add HTTP headers to the request. 5735func (c *PropertiesDeleteCall) Header() http.Header { 5736 if c.header_ == nil { 5737 c.header_ = make(http.Header) 5738 } 5739 return c.header_ 5740} 5741 5742func (c *PropertiesDeleteCall) doRequest(alt string) (*http.Response, error) { 5743 reqHeaders := make(http.Header) 5744 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5745 for k, v := range c.header_ { 5746 reqHeaders[k] = v 5747 } 5748 reqHeaders.Set("User-Agent", c.s.userAgent()) 5749 var body io.Reader = nil 5750 c.urlParams_.Set("alt", alt) 5751 c.urlParams_.Set("prettyPrint", "false") 5752 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 5753 urls += "?" + c.urlParams_.Encode() 5754 req, err := http.NewRequest("DELETE", urls, body) 5755 if err != nil { 5756 return nil, err 5757 } 5758 req.Header = reqHeaders 5759 googleapi.Expand(req.URL, map[string]string{ 5760 "name": c.name, 5761 }) 5762 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5763} 5764 5765// Do executes the "analyticsadmin.properties.delete" call. 5766// Exactly one of *GoogleAnalyticsAdminV1alphaProperty or error will be 5767// non-nil. Any non-2xx status code is an error. Response headers are in 5768// either *GoogleAnalyticsAdminV1alphaProperty.ServerResponse.Header or 5769// (if a response was returned at all) in 5770// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 5771// whether the returned error was because http.StatusNotModified was 5772// returned. 5773func (c *PropertiesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaProperty, error) { 5774 gensupport.SetOptions(c.urlParams_, opts...) 5775 res, err := c.doRequest("json") 5776 if res != nil && res.StatusCode == http.StatusNotModified { 5777 if res.Body != nil { 5778 res.Body.Close() 5779 } 5780 return nil, &googleapi.Error{ 5781 Code: res.StatusCode, 5782 Header: res.Header, 5783 } 5784 } 5785 if err != nil { 5786 return nil, err 5787 } 5788 defer googleapi.CloseBody(res) 5789 if err := googleapi.CheckResponse(res); err != nil { 5790 return nil, err 5791 } 5792 ret := &GoogleAnalyticsAdminV1alphaProperty{ 5793 ServerResponse: googleapi.ServerResponse{ 5794 Header: res.Header, 5795 HTTPStatusCode: res.StatusCode, 5796 }, 5797 } 5798 target := &ret 5799 if err := gensupport.DecodeResponse(target, res); err != nil { 5800 return nil, err 5801 } 5802 return ret, nil 5803 // { 5804 // "description": "Marks target Property as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI. If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found, or is not an GA4 Property.", 5805 // "flatPath": "v1alpha/properties/{propertiesId}", 5806 // "httpMethod": "DELETE", 5807 // "id": "analyticsadmin.properties.delete", 5808 // "parameterOrder": [ 5809 // "name" 5810 // ], 5811 // "parameters": { 5812 // "name": { 5813 // "description": "Required. The name of the Property to soft-delete. Format: properties/{property_id} Example: \"properties/1000\"", 5814 // "location": "path", 5815 // "pattern": "^properties/[^/]+$", 5816 // "required": true, 5817 // "type": "string" 5818 // } 5819 // }, 5820 // "path": "v1alpha/{+name}", 5821 // "response": { 5822 // "$ref": "GoogleAnalyticsAdminV1alphaProperty" 5823 // }, 5824 // "scopes": [ 5825 // "https://www.googleapis.com/auth/analytics.edit" 5826 // ] 5827 // } 5828 5829} 5830 5831// method id "analyticsadmin.properties.get": 5832 5833type PropertiesGetCall struct { 5834 s *Service 5835 name string 5836 urlParams_ gensupport.URLParams 5837 ifNoneMatch_ string 5838 ctx_ context.Context 5839 header_ http.Header 5840} 5841 5842// Get: Lookup for a single "GA4" Property. 5843// 5844// - name: The name of the property to lookup. Format: 5845// properties/{property_id} Example: "properties/1000". 5846func (r *PropertiesService) Get(name string) *PropertiesGetCall { 5847 c := &PropertiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5848 c.name = name 5849 return c 5850} 5851 5852// Fields allows partial responses to be retrieved. See 5853// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5854// for more information. 5855func (c *PropertiesGetCall) Fields(s ...googleapi.Field) *PropertiesGetCall { 5856 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5857 return c 5858} 5859 5860// IfNoneMatch sets the optional parameter which makes the operation 5861// fail if the object's ETag matches the given value. This is useful for 5862// getting updates only after the object has changed since the last 5863// request. Use googleapi.IsNotModified to check whether the response 5864// error from Do is the result of In-None-Match. 5865func (c *PropertiesGetCall) IfNoneMatch(entityTag string) *PropertiesGetCall { 5866 c.ifNoneMatch_ = entityTag 5867 return c 5868} 5869 5870// Context sets the context to be used in this call's Do method. Any 5871// pending HTTP request will be aborted if the provided context is 5872// canceled. 5873func (c *PropertiesGetCall) Context(ctx context.Context) *PropertiesGetCall { 5874 c.ctx_ = ctx 5875 return c 5876} 5877 5878// Header returns an http.Header that can be modified by the caller to 5879// add HTTP headers to the request. 5880func (c *PropertiesGetCall) Header() http.Header { 5881 if c.header_ == nil { 5882 c.header_ = make(http.Header) 5883 } 5884 return c.header_ 5885} 5886 5887func (c *PropertiesGetCall) doRequest(alt string) (*http.Response, error) { 5888 reqHeaders := make(http.Header) 5889 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 5890 for k, v := range c.header_ { 5891 reqHeaders[k] = v 5892 } 5893 reqHeaders.Set("User-Agent", c.s.userAgent()) 5894 if c.ifNoneMatch_ != "" { 5895 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5896 } 5897 var body io.Reader = nil 5898 c.urlParams_.Set("alt", alt) 5899 c.urlParams_.Set("prettyPrint", "false") 5900 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 5901 urls += "?" + c.urlParams_.Encode() 5902 req, err := http.NewRequest("GET", urls, body) 5903 if err != nil { 5904 return nil, err 5905 } 5906 req.Header = reqHeaders 5907 googleapi.Expand(req.URL, map[string]string{ 5908 "name": c.name, 5909 }) 5910 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5911} 5912 5913// Do executes the "analyticsadmin.properties.get" call. 5914// Exactly one of *GoogleAnalyticsAdminV1alphaProperty or error will be 5915// non-nil. Any non-2xx status code is an error. Response headers are in 5916// either *GoogleAnalyticsAdminV1alphaProperty.ServerResponse.Header or 5917// (if a response was returned at all) in 5918// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 5919// whether the returned error was because http.StatusNotModified was 5920// returned. 5921func (c *PropertiesGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaProperty, error) { 5922 gensupport.SetOptions(c.urlParams_, opts...) 5923 res, err := c.doRequest("json") 5924 if res != nil && res.StatusCode == http.StatusNotModified { 5925 if res.Body != nil { 5926 res.Body.Close() 5927 } 5928 return nil, &googleapi.Error{ 5929 Code: res.StatusCode, 5930 Header: res.Header, 5931 } 5932 } 5933 if err != nil { 5934 return nil, err 5935 } 5936 defer googleapi.CloseBody(res) 5937 if err := googleapi.CheckResponse(res); err != nil { 5938 return nil, err 5939 } 5940 ret := &GoogleAnalyticsAdminV1alphaProperty{ 5941 ServerResponse: googleapi.ServerResponse{ 5942 Header: res.Header, 5943 HTTPStatusCode: res.StatusCode, 5944 }, 5945 } 5946 target := &ret 5947 if err := gensupport.DecodeResponse(target, res); err != nil { 5948 return nil, err 5949 } 5950 return ret, nil 5951 // { 5952 // "description": "Lookup for a single \"GA4\" Property.", 5953 // "flatPath": "v1alpha/properties/{propertiesId}", 5954 // "httpMethod": "GET", 5955 // "id": "analyticsadmin.properties.get", 5956 // "parameterOrder": [ 5957 // "name" 5958 // ], 5959 // "parameters": { 5960 // "name": { 5961 // "description": "Required. The name of the property to lookup. Format: properties/{property_id} Example: \"properties/1000\"", 5962 // "location": "path", 5963 // "pattern": "^properties/[^/]+$", 5964 // "required": true, 5965 // "type": "string" 5966 // } 5967 // }, 5968 // "path": "v1alpha/{+name}", 5969 // "response": { 5970 // "$ref": "GoogleAnalyticsAdminV1alphaProperty" 5971 // }, 5972 // "scopes": [ 5973 // "https://www.googleapis.com/auth/analytics.edit", 5974 // "https://www.googleapis.com/auth/analytics.readonly" 5975 // ] 5976 // } 5977 5978} 5979 5980// method id "analyticsadmin.properties.getGoogleSignalsSettings": 5981 5982type PropertiesGetGoogleSignalsSettingsCall struct { 5983 s *Service 5984 name string 5985 urlParams_ gensupport.URLParams 5986 ifNoneMatch_ string 5987 ctx_ context.Context 5988 header_ http.Header 5989} 5990 5991// GetGoogleSignalsSettings: Lookup for Google Signals settings for a 5992// property. 5993// 5994// - name: The name of the google signals settings to retrieve. Format: 5995// properties/{property}/googleSignalsSettings. 5996func (r *PropertiesService) GetGoogleSignalsSettings(name string) *PropertiesGetGoogleSignalsSettingsCall { 5997 c := &PropertiesGetGoogleSignalsSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5998 c.name = name 5999 return c 6000} 6001 6002// Fields allows partial responses to be retrieved. See 6003// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6004// for more information. 6005func (c *PropertiesGetGoogleSignalsSettingsCall) Fields(s ...googleapi.Field) *PropertiesGetGoogleSignalsSettingsCall { 6006 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6007 return c 6008} 6009 6010// IfNoneMatch sets the optional parameter which makes the operation 6011// fail if the object's ETag matches the given value. This is useful for 6012// getting updates only after the object has changed since the last 6013// request. Use googleapi.IsNotModified to check whether the response 6014// error from Do is the result of In-None-Match. 6015func (c *PropertiesGetGoogleSignalsSettingsCall) IfNoneMatch(entityTag string) *PropertiesGetGoogleSignalsSettingsCall { 6016 c.ifNoneMatch_ = entityTag 6017 return c 6018} 6019 6020// Context sets the context to be used in this call's Do method. Any 6021// pending HTTP request will be aborted if the provided context is 6022// canceled. 6023func (c *PropertiesGetGoogleSignalsSettingsCall) Context(ctx context.Context) *PropertiesGetGoogleSignalsSettingsCall { 6024 c.ctx_ = ctx 6025 return c 6026} 6027 6028// Header returns an http.Header that can be modified by the caller to 6029// add HTTP headers to the request. 6030func (c *PropertiesGetGoogleSignalsSettingsCall) Header() http.Header { 6031 if c.header_ == nil { 6032 c.header_ = make(http.Header) 6033 } 6034 return c.header_ 6035} 6036 6037func (c *PropertiesGetGoogleSignalsSettingsCall) doRequest(alt string) (*http.Response, error) { 6038 reqHeaders := make(http.Header) 6039 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6040 for k, v := range c.header_ { 6041 reqHeaders[k] = v 6042 } 6043 reqHeaders.Set("User-Agent", c.s.userAgent()) 6044 if c.ifNoneMatch_ != "" { 6045 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6046 } 6047 var body io.Reader = nil 6048 c.urlParams_.Set("alt", alt) 6049 c.urlParams_.Set("prettyPrint", "false") 6050 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 6051 urls += "?" + c.urlParams_.Encode() 6052 req, err := http.NewRequest("GET", urls, body) 6053 if err != nil { 6054 return nil, err 6055 } 6056 req.Header = reqHeaders 6057 googleapi.Expand(req.URL, map[string]string{ 6058 "name": c.name, 6059 }) 6060 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6061} 6062 6063// Do executes the "analyticsadmin.properties.getGoogleSignalsSettings" call. 6064// Exactly one of *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings or 6065// error will be non-nil. Any non-2xx status code is an error. Response 6066// headers are in either 6067// *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings.ServerResponse.Heade 6068// r or (if a response was returned at all) in 6069// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6070// whether the returned error was because http.StatusNotModified was 6071// returned. 6072func (c *PropertiesGetGoogleSignalsSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaGoogleSignalsSettings, error) { 6073 gensupport.SetOptions(c.urlParams_, opts...) 6074 res, err := c.doRequest("json") 6075 if res != nil && res.StatusCode == http.StatusNotModified { 6076 if res.Body != nil { 6077 res.Body.Close() 6078 } 6079 return nil, &googleapi.Error{ 6080 Code: res.StatusCode, 6081 Header: res.Header, 6082 } 6083 } 6084 if err != nil { 6085 return nil, err 6086 } 6087 defer googleapi.CloseBody(res) 6088 if err := googleapi.CheckResponse(res); err != nil { 6089 return nil, err 6090 } 6091 ret := &GoogleAnalyticsAdminV1alphaGoogleSignalsSettings{ 6092 ServerResponse: googleapi.ServerResponse{ 6093 Header: res.Header, 6094 HTTPStatusCode: res.StatusCode, 6095 }, 6096 } 6097 target := &ret 6098 if err := gensupport.DecodeResponse(target, res); err != nil { 6099 return nil, err 6100 } 6101 return ret, nil 6102 // { 6103 // "description": "Lookup for Google Signals settings for a property.", 6104 // "flatPath": "v1alpha/properties/{propertiesId}/googleSignalsSettings", 6105 // "httpMethod": "GET", 6106 // "id": "analyticsadmin.properties.getGoogleSignalsSettings", 6107 // "parameterOrder": [ 6108 // "name" 6109 // ], 6110 // "parameters": { 6111 // "name": { 6112 // "description": "Required. The name of the google signals settings to retrieve. Format: properties/{property}/googleSignalsSettings", 6113 // "location": "path", 6114 // "pattern": "^properties/[^/]+/googleSignalsSettings$", 6115 // "required": true, 6116 // "type": "string" 6117 // } 6118 // }, 6119 // "path": "v1alpha/{+name}", 6120 // "response": { 6121 // "$ref": "GoogleAnalyticsAdminV1alphaGoogleSignalsSettings" 6122 // }, 6123 // "scopes": [ 6124 // "https://www.googleapis.com/auth/analytics.edit", 6125 // "https://www.googleapis.com/auth/analytics.readonly" 6126 // ] 6127 // } 6128 6129} 6130 6131// method id "analyticsadmin.properties.list": 6132 6133type PropertiesListCall struct { 6134 s *Service 6135 urlParams_ gensupport.URLParams 6136 ifNoneMatch_ string 6137 ctx_ context.Context 6138 header_ http.Header 6139} 6140 6141// List: Returns child Properties under the specified parent Account. 6142// Only "GA4" properties will be returned. Properties will be excluded 6143// if the caller does not have access. Soft-deleted (ie: "trashed") 6144// properties are excluded by default. Returns an empty list if no 6145// relevant properties are found. 6146func (r *PropertiesService) List() *PropertiesListCall { 6147 c := &PropertiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6148 return c 6149} 6150 6151// Filter sets the optional parameter "filter": Required. An expression 6152// for filtering the results of the request. Fields eligible for 6153// filtering are: `parent:`(The resource name of the parent account) or 6154// `firebase_project:`(The id or number of the linked firebase project). 6155// Some examples of filters: ``` | Filter | Description | 6156// |-----------------------------|--------------------------------------- 6157// ----| | parent:accounts/123 | The account with account id: 123. | | 6158// firebase_project:project-id | The firebase project with id: 6159// project-id. | | firebase_project:123 | The firebase project with 6160// number: 123. | ``` 6161func (c *PropertiesListCall) Filter(filter string) *PropertiesListCall { 6162 c.urlParams_.Set("filter", filter) 6163 return c 6164} 6165 6166// PageSize sets the optional parameter "pageSize": The maximum number 6167// of resources to return. The service may return fewer than this value, 6168// even if there are additional pages. If unspecified, at most 50 6169// resources will be returned. The maximum value is 200; (higher values 6170// will be coerced to the maximum) 6171func (c *PropertiesListCall) PageSize(pageSize int64) *PropertiesListCall { 6172 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 6173 return c 6174} 6175 6176// PageToken sets the optional parameter "pageToken": A page token, 6177// received from a previous `ListProperties` call. Provide this to 6178// retrieve the subsequent page. When paginating, all other parameters 6179// provided to `ListProperties` must match the call that provided the 6180// page token. 6181func (c *PropertiesListCall) PageToken(pageToken string) *PropertiesListCall { 6182 c.urlParams_.Set("pageToken", pageToken) 6183 return c 6184} 6185 6186// ShowDeleted sets the optional parameter "showDeleted": Whether to 6187// include soft-deleted (ie: "trashed") Properties in the results. 6188// Properties can be inspected to determine whether they are deleted or 6189// not. 6190func (c *PropertiesListCall) ShowDeleted(showDeleted bool) *PropertiesListCall { 6191 c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) 6192 return c 6193} 6194 6195// Fields allows partial responses to be retrieved. See 6196// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6197// for more information. 6198func (c *PropertiesListCall) Fields(s ...googleapi.Field) *PropertiesListCall { 6199 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6200 return c 6201} 6202 6203// IfNoneMatch sets the optional parameter which makes the operation 6204// fail if the object's ETag matches the given value. This is useful for 6205// getting updates only after the object has changed since the last 6206// request. Use googleapi.IsNotModified to check whether the response 6207// error from Do is the result of In-None-Match. 6208func (c *PropertiesListCall) IfNoneMatch(entityTag string) *PropertiesListCall { 6209 c.ifNoneMatch_ = entityTag 6210 return c 6211} 6212 6213// Context sets the context to be used in this call's Do method. Any 6214// pending HTTP request will be aborted if the provided context is 6215// canceled. 6216func (c *PropertiesListCall) Context(ctx context.Context) *PropertiesListCall { 6217 c.ctx_ = ctx 6218 return c 6219} 6220 6221// Header returns an http.Header that can be modified by the caller to 6222// add HTTP headers to the request. 6223func (c *PropertiesListCall) Header() http.Header { 6224 if c.header_ == nil { 6225 c.header_ = make(http.Header) 6226 } 6227 return c.header_ 6228} 6229 6230func (c *PropertiesListCall) doRequest(alt string) (*http.Response, error) { 6231 reqHeaders := make(http.Header) 6232 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6233 for k, v := range c.header_ { 6234 reqHeaders[k] = v 6235 } 6236 reqHeaders.Set("User-Agent", c.s.userAgent()) 6237 if c.ifNoneMatch_ != "" { 6238 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6239 } 6240 var body io.Reader = nil 6241 c.urlParams_.Set("alt", alt) 6242 c.urlParams_.Set("prettyPrint", "false") 6243 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/properties") 6244 urls += "?" + c.urlParams_.Encode() 6245 req, err := http.NewRequest("GET", urls, body) 6246 if err != nil { 6247 return nil, err 6248 } 6249 req.Header = reqHeaders 6250 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6251} 6252 6253// Do executes the "analyticsadmin.properties.list" call. 6254// Exactly one of *GoogleAnalyticsAdminV1alphaListPropertiesResponse or 6255// error will be non-nil. Any non-2xx status code is an error. Response 6256// headers are in either 6257// *GoogleAnalyticsAdminV1alphaListPropertiesResponse.ServerResponse.Head 6258// er or (if a response was returned at all) in 6259// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6260// whether the returned error was because http.StatusNotModified was 6261// returned. 6262func (c *PropertiesListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListPropertiesResponse, error) { 6263 gensupport.SetOptions(c.urlParams_, opts...) 6264 res, err := c.doRequest("json") 6265 if res != nil && res.StatusCode == http.StatusNotModified { 6266 if res.Body != nil { 6267 res.Body.Close() 6268 } 6269 return nil, &googleapi.Error{ 6270 Code: res.StatusCode, 6271 Header: res.Header, 6272 } 6273 } 6274 if err != nil { 6275 return nil, err 6276 } 6277 defer googleapi.CloseBody(res) 6278 if err := googleapi.CheckResponse(res); err != nil { 6279 return nil, err 6280 } 6281 ret := &GoogleAnalyticsAdminV1alphaListPropertiesResponse{ 6282 ServerResponse: googleapi.ServerResponse{ 6283 Header: res.Header, 6284 HTTPStatusCode: res.StatusCode, 6285 }, 6286 } 6287 target := &ret 6288 if err := gensupport.DecodeResponse(target, res); err != nil { 6289 return nil, err 6290 } 6291 return ret, nil 6292 // { 6293 // "description": "Returns child Properties under the specified parent Account. Only \"GA4\" properties will be returned. Properties will be excluded if the caller does not have access. Soft-deleted (ie: \"trashed\") properties are excluded by default. Returns an empty list if no relevant properties are found.", 6294 // "flatPath": "v1alpha/properties", 6295 // "httpMethod": "GET", 6296 // "id": "analyticsadmin.properties.list", 6297 // "parameterOrder": [], 6298 // "parameters": { 6299 // "filter": { 6300 // "description": "Required. An expression for filtering the results of the request. Fields eligible for filtering are: `parent:`(The resource name of the parent account) or `firebase_project:`(The id or number of the linked firebase project). Some examples of filters: ``` | Filter | Description | |-----------------------------|-------------------------------------------| | parent:accounts/123 | The account with account id: 123. | | firebase_project:project-id | The firebase project with id: project-id. | | firebase_project:123 | The firebase project with number: 123. | ```", 6301 // "location": "query", 6302 // "type": "string" 6303 // }, 6304 // "pageSize": { 6305 // "description": "The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)", 6306 // "format": "int32", 6307 // "location": "query", 6308 // "type": "integer" 6309 // }, 6310 // "pageToken": { 6311 // "description": "A page token, received from a previous `ListProperties` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListProperties` must match the call that provided the page token.", 6312 // "location": "query", 6313 // "type": "string" 6314 // }, 6315 // "showDeleted": { 6316 // "description": "Whether to include soft-deleted (ie: \"trashed\") Properties in the results. Properties can be inspected to determine whether they are deleted or not.", 6317 // "location": "query", 6318 // "type": "boolean" 6319 // } 6320 // }, 6321 // "path": "v1alpha/properties", 6322 // "response": { 6323 // "$ref": "GoogleAnalyticsAdminV1alphaListPropertiesResponse" 6324 // }, 6325 // "scopes": [ 6326 // "https://www.googleapis.com/auth/analytics.edit", 6327 // "https://www.googleapis.com/auth/analytics.readonly" 6328 // ] 6329 // } 6330 6331} 6332 6333// Pages invokes f for each page of results. 6334// A non-nil error returned from f will halt the iteration. 6335// The provided context supersedes any context provided to the Context method. 6336func (c *PropertiesListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListPropertiesResponse) error) error { 6337 c.ctx_ = ctx 6338 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 6339 for { 6340 x, err := c.Do() 6341 if err != nil { 6342 return err 6343 } 6344 if err := f(x); err != nil { 6345 return err 6346 } 6347 if x.NextPageToken == "" { 6348 return nil 6349 } 6350 c.PageToken(x.NextPageToken) 6351 } 6352} 6353 6354// method id "analyticsadmin.properties.patch": 6355 6356type PropertiesPatchCall struct { 6357 s *Service 6358 name string 6359 googleanalyticsadminv1alphaproperty *GoogleAnalyticsAdminV1alphaProperty 6360 urlParams_ gensupport.URLParams 6361 ctx_ context.Context 6362 header_ http.Header 6363} 6364 6365// Patch: Updates a property. 6366// 6367// - name: Output only. Resource name of this property. Format: 6368// properties/{property_id} Example: "properties/1000". 6369func (r *PropertiesService) Patch(name string, googleanalyticsadminv1alphaproperty *GoogleAnalyticsAdminV1alphaProperty) *PropertiesPatchCall { 6370 c := &PropertiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6371 c.name = name 6372 c.googleanalyticsadminv1alphaproperty = googleanalyticsadminv1alphaproperty 6373 return c 6374} 6375 6376// UpdateMask sets the optional parameter "updateMask": Required. The 6377// list of fields to be updated. Field names must be in snake case 6378// (e.g., "field_to_update"). Omitted fields will not be updated. To 6379// replace the entire entity, use one path with the string "*" to match 6380// all fields. 6381func (c *PropertiesPatchCall) UpdateMask(updateMask string) *PropertiesPatchCall { 6382 c.urlParams_.Set("updateMask", updateMask) 6383 return c 6384} 6385 6386// Fields allows partial responses to be retrieved. See 6387// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6388// for more information. 6389func (c *PropertiesPatchCall) Fields(s ...googleapi.Field) *PropertiesPatchCall { 6390 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6391 return c 6392} 6393 6394// Context sets the context to be used in this call's Do method. Any 6395// pending HTTP request will be aborted if the provided context is 6396// canceled. 6397func (c *PropertiesPatchCall) Context(ctx context.Context) *PropertiesPatchCall { 6398 c.ctx_ = ctx 6399 return c 6400} 6401 6402// Header returns an http.Header that can be modified by the caller to 6403// add HTTP headers to the request. 6404func (c *PropertiesPatchCall) Header() http.Header { 6405 if c.header_ == nil { 6406 c.header_ = make(http.Header) 6407 } 6408 return c.header_ 6409} 6410 6411func (c *PropertiesPatchCall) doRequest(alt string) (*http.Response, error) { 6412 reqHeaders := make(http.Header) 6413 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6414 for k, v := range c.header_ { 6415 reqHeaders[k] = v 6416 } 6417 reqHeaders.Set("User-Agent", c.s.userAgent()) 6418 var body io.Reader = nil 6419 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaproperty) 6420 if err != nil { 6421 return nil, err 6422 } 6423 reqHeaders.Set("Content-Type", "application/json") 6424 c.urlParams_.Set("alt", alt) 6425 c.urlParams_.Set("prettyPrint", "false") 6426 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 6427 urls += "?" + c.urlParams_.Encode() 6428 req, err := http.NewRequest("PATCH", urls, body) 6429 if err != nil { 6430 return nil, err 6431 } 6432 req.Header = reqHeaders 6433 googleapi.Expand(req.URL, map[string]string{ 6434 "name": c.name, 6435 }) 6436 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6437} 6438 6439// Do executes the "analyticsadmin.properties.patch" call. 6440// Exactly one of *GoogleAnalyticsAdminV1alphaProperty or error will be 6441// non-nil. Any non-2xx status code is an error. Response headers are in 6442// either *GoogleAnalyticsAdminV1alphaProperty.ServerResponse.Header or 6443// (if a response was returned at all) in 6444// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6445// whether the returned error was because http.StatusNotModified was 6446// returned. 6447func (c *PropertiesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaProperty, error) { 6448 gensupport.SetOptions(c.urlParams_, opts...) 6449 res, err := c.doRequest("json") 6450 if res != nil && res.StatusCode == http.StatusNotModified { 6451 if res.Body != nil { 6452 res.Body.Close() 6453 } 6454 return nil, &googleapi.Error{ 6455 Code: res.StatusCode, 6456 Header: res.Header, 6457 } 6458 } 6459 if err != nil { 6460 return nil, err 6461 } 6462 defer googleapi.CloseBody(res) 6463 if err := googleapi.CheckResponse(res); err != nil { 6464 return nil, err 6465 } 6466 ret := &GoogleAnalyticsAdminV1alphaProperty{ 6467 ServerResponse: googleapi.ServerResponse{ 6468 Header: res.Header, 6469 HTTPStatusCode: res.StatusCode, 6470 }, 6471 } 6472 target := &ret 6473 if err := gensupport.DecodeResponse(target, res); err != nil { 6474 return nil, err 6475 } 6476 return ret, nil 6477 // { 6478 // "description": "Updates a property.", 6479 // "flatPath": "v1alpha/properties/{propertiesId}", 6480 // "httpMethod": "PATCH", 6481 // "id": "analyticsadmin.properties.patch", 6482 // "parameterOrder": [ 6483 // "name" 6484 // ], 6485 // "parameters": { 6486 // "name": { 6487 // "description": "Output only. Resource name of this property. Format: properties/{property_id} Example: \"properties/1000\"", 6488 // "location": "path", 6489 // "pattern": "^properties/[^/]+$", 6490 // "required": true, 6491 // "type": "string" 6492 // }, 6493 // "updateMask": { 6494 // "description": "Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the entire entity, use one path with the string \"*\" to match all fields.", 6495 // "format": "google-fieldmask", 6496 // "location": "query", 6497 // "type": "string" 6498 // } 6499 // }, 6500 // "path": "v1alpha/{+name}", 6501 // "request": { 6502 // "$ref": "GoogleAnalyticsAdminV1alphaProperty" 6503 // }, 6504 // "response": { 6505 // "$ref": "GoogleAnalyticsAdminV1alphaProperty" 6506 // }, 6507 // "scopes": [ 6508 // "https://www.googleapis.com/auth/analytics.edit" 6509 // ] 6510 // } 6511 6512} 6513 6514// method id "analyticsadmin.properties.updateGoogleSignalsSettings": 6515 6516type PropertiesUpdateGoogleSignalsSettingsCall struct { 6517 s *Service 6518 name string 6519 googleanalyticsadminv1alphagooglesignalssettings *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings 6520 urlParams_ gensupport.URLParams 6521 ctx_ context.Context 6522 header_ http.Header 6523} 6524 6525// UpdateGoogleSignalsSettings: Updates Google Signals settings for a 6526// property. 6527// 6528// - name: Output only. Resource name of this setting. Format: 6529// properties/{property_id}/googleSignalsSettings Example: 6530// "properties/1000/googleSignalsSettings". 6531func (r *PropertiesService) UpdateGoogleSignalsSettings(name string, googleanalyticsadminv1alphagooglesignalssettings *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings) *PropertiesUpdateGoogleSignalsSettingsCall { 6532 c := &PropertiesUpdateGoogleSignalsSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6533 c.name = name 6534 c.googleanalyticsadminv1alphagooglesignalssettings = googleanalyticsadminv1alphagooglesignalssettings 6535 return c 6536} 6537 6538// UpdateMask sets the optional parameter "updateMask": Required. The 6539// list of fields to be updated. Field names must be in snake case 6540// (e.g., "field_to_update"). Omitted fields will not be updated. To 6541// replace the entire entity, use one path with the string "*" to match 6542// all fields. 6543func (c *PropertiesUpdateGoogleSignalsSettingsCall) UpdateMask(updateMask string) *PropertiesUpdateGoogleSignalsSettingsCall { 6544 c.urlParams_.Set("updateMask", updateMask) 6545 return c 6546} 6547 6548// Fields allows partial responses to be retrieved. See 6549// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6550// for more information. 6551func (c *PropertiesUpdateGoogleSignalsSettingsCall) Fields(s ...googleapi.Field) *PropertiesUpdateGoogleSignalsSettingsCall { 6552 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6553 return c 6554} 6555 6556// Context sets the context to be used in this call's Do method. Any 6557// pending HTTP request will be aborted if the provided context is 6558// canceled. 6559func (c *PropertiesUpdateGoogleSignalsSettingsCall) Context(ctx context.Context) *PropertiesUpdateGoogleSignalsSettingsCall { 6560 c.ctx_ = ctx 6561 return c 6562} 6563 6564// Header returns an http.Header that can be modified by the caller to 6565// add HTTP headers to the request. 6566func (c *PropertiesUpdateGoogleSignalsSettingsCall) Header() http.Header { 6567 if c.header_ == nil { 6568 c.header_ = make(http.Header) 6569 } 6570 return c.header_ 6571} 6572 6573func (c *PropertiesUpdateGoogleSignalsSettingsCall) doRequest(alt string) (*http.Response, error) { 6574 reqHeaders := make(http.Header) 6575 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6576 for k, v := range c.header_ { 6577 reqHeaders[k] = v 6578 } 6579 reqHeaders.Set("User-Agent", c.s.userAgent()) 6580 var body io.Reader = nil 6581 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphagooglesignalssettings) 6582 if err != nil { 6583 return nil, err 6584 } 6585 reqHeaders.Set("Content-Type", "application/json") 6586 c.urlParams_.Set("alt", alt) 6587 c.urlParams_.Set("prettyPrint", "false") 6588 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 6589 urls += "?" + c.urlParams_.Encode() 6590 req, err := http.NewRequest("PATCH", urls, body) 6591 if err != nil { 6592 return nil, err 6593 } 6594 req.Header = reqHeaders 6595 googleapi.Expand(req.URL, map[string]string{ 6596 "name": c.name, 6597 }) 6598 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6599} 6600 6601// Do executes the "analyticsadmin.properties.updateGoogleSignalsSettings" call. 6602// Exactly one of *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings or 6603// error will be non-nil. Any non-2xx status code is an error. Response 6604// headers are in either 6605// *GoogleAnalyticsAdminV1alphaGoogleSignalsSettings.ServerResponse.Heade 6606// r or (if a response was returned at all) in 6607// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6608// whether the returned error was because http.StatusNotModified was 6609// returned. 6610func (c *PropertiesUpdateGoogleSignalsSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaGoogleSignalsSettings, error) { 6611 gensupport.SetOptions(c.urlParams_, opts...) 6612 res, err := c.doRequest("json") 6613 if res != nil && res.StatusCode == http.StatusNotModified { 6614 if res.Body != nil { 6615 res.Body.Close() 6616 } 6617 return nil, &googleapi.Error{ 6618 Code: res.StatusCode, 6619 Header: res.Header, 6620 } 6621 } 6622 if err != nil { 6623 return nil, err 6624 } 6625 defer googleapi.CloseBody(res) 6626 if err := googleapi.CheckResponse(res); err != nil { 6627 return nil, err 6628 } 6629 ret := &GoogleAnalyticsAdminV1alphaGoogleSignalsSettings{ 6630 ServerResponse: googleapi.ServerResponse{ 6631 Header: res.Header, 6632 HTTPStatusCode: res.StatusCode, 6633 }, 6634 } 6635 target := &ret 6636 if err := gensupport.DecodeResponse(target, res); err != nil { 6637 return nil, err 6638 } 6639 return ret, nil 6640 // { 6641 // "description": "Updates Google Signals settings for a property.", 6642 // "flatPath": "v1alpha/properties/{propertiesId}/googleSignalsSettings", 6643 // "httpMethod": "PATCH", 6644 // "id": "analyticsadmin.properties.updateGoogleSignalsSettings", 6645 // "parameterOrder": [ 6646 // "name" 6647 // ], 6648 // "parameters": { 6649 // "name": { 6650 // "description": "Output only. Resource name of this setting. Format: properties/{property_id}/googleSignalsSettings Example: \"properties/1000/googleSignalsSettings\"", 6651 // "location": "path", 6652 // "pattern": "^properties/[^/]+/googleSignalsSettings$", 6653 // "required": true, 6654 // "type": "string" 6655 // }, 6656 // "updateMask": { 6657 // "description": "Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the entire entity, use one path with the string \"*\" to match all fields.", 6658 // "format": "google-fieldmask", 6659 // "location": "query", 6660 // "type": "string" 6661 // } 6662 // }, 6663 // "path": "v1alpha/{+name}", 6664 // "request": { 6665 // "$ref": "GoogleAnalyticsAdminV1alphaGoogleSignalsSettings" 6666 // }, 6667 // "response": { 6668 // "$ref": "GoogleAnalyticsAdminV1alphaGoogleSignalsSettings" 6669 // }, 6670 // "scopes": [ 6671 // "https://www.googleapis.com/auth/analytics.edit" 6672 // ] 6673 // } 6674 6675} 6676 6677// method id "analyticsadmin.properties.androidAppDataStreams.delete": 6678 6679type PropertiesAndroidAppDataStreamsDeleteCall struct { 6680 s *Service 6681 name string 6682 urlParams_ gensupport.URLParams 6683 ctx_ context.Context 6684 header_ http.Header 6685} 6686 6687// Delete: Deletes an android app stream on a property. 6688// 6689// - name: The name of the android app data stream to delete. Format: 6690// properties/{property_id}/androidAppDataStreams/{stream_id} Example: 6691// "properties/123/androidAppDataStreams/456". 6692func (r *PropertiesAndroidAppDataStreamsService) Delete(name string) *PropertiesAndroidAppDataStreamsDeleteCall { 6693 c := &PropertiesAndroidAppDataStreamsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6694 c.name = name 6695 return c 6696} 6697 6698// Fields allows partial responses to be retrieved. See 6699// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6700// for more information. 6701func (c *PropertiesAndroidAppDataStreamsDeleteCall) Fields(s ...googleapi.Field) *PropertiesAndroidAppDataStreamsDeleteCall { 6702 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6703 return c 6704} 6705 6706// Context sets the context to be used in this call's Do method. Any 6707// pending HTTP request will be aborted if the provided context is 6708// canceled. 6709func (c *PropertiesAndroidAppDataStreamsDeleteCall) Context(ctx context.Context) *PropertiesAndroidAppDataStreamsDeleteCall { 6710 c.ctx_ = ctx 6711 return c 6712} 6713 6714// Header returns an http.Header that can be modified by the caller to 6715// add HTTP headers to the request. 6716func (c *PropertiesAndroidAppDataStreamsDeleteCall) Header() http.Header { 6717 if c.header_ == nil { 6718 c.header_ = make(http.Header) 6719 } 6720 return c.header_ 6721} 6722 6723func (c *PropertiesAndroidAppDataStreamsDeleteCall) doRequest(alt string) (*http.Response, error) { 6724 reqHeaders := make(http.Header) 6725 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6726 for k, v := range c.header_ { 6727 reqHeaders[k] = v 6728 } 6729 reqHeaders.Set("User-Agent", c.s.userAgent()) 6730 var body io.Reader = nil 6731 c.urlParams_.Set("alt", alt) 6732 c.urlParams_.Set("prettyPrint", "false") 6733 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 6734 urls += "?" + c.urlParams_.Encode() 6735 req, err := http.NewRequest("DELETE", urls, body) 6736 if err != nil { 6737 return nil, err 6738 } 6739 req.Header = reqHeaders 6740 googleapi.Expand(req.URL, map[string]string{ 6741 "name": c.name, 6742 }) 6743 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6744} 6745 6746// Do executes the "analyticsadmin.properties.androidAppDataStreams.delete" call. 6747// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 6748// non-2xx status code is an error. Response headers are in either 6749// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 6750// returned at all) in error.(*googleapi.Error).Header. Use 6751// googleapi.IsNotModified to check whether the returned error was 6752// because http.StatusNotModified was returned. 6753func (c *PropertiesAndroidAppDataStreamsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 6754 gensupport.SetOptions(c.urlParams_, opts...) 6755 res, err := c.doRequest("json") 6756 if res != nil && res.StatusCode == http.StatusNotModified { 6757 if res.Body != nil { 6758 res.Body.Close() 6759 } 6760 return nil, &googleapi.Error{ 6761 Code: res.StatusCode, 6762 Header: res.Header, 6763 } 6764 } 6765 if err != nil { 6766 return nil, err 6767 } 6768 defer googleapi.CloseBody(res) 6769 if err := googleapi.CheckResponse(res); err != nil { 6770 return nil, err 6771 } 6772 ret := &GoogleProtobufEmpty{ 6773 ServerResponse: googleapi.ServerResponse{ 6774 Header: res.Header, 6775 HTTPStatusCode: res.StatusCode, 6776 }, 6777 } 6778 target := &ret 6779 if err := gensupport.DecodeResponse(target, res); err != nil { 6780 return nil, err 6781 } 6782 return ret, nil 6783 // { 6784 // "description": "Deletes an android app stream on a property.", 6785 // "flatPath": "v1alpha/properties/{propertiesId}/androidAppDataStreams/{androidAppDataStreamsId}", 6786 // "httpMethod": "DELETE", 6787 // "id": "analyticsadmin.properties.androidAppDataStreams.delete", 6788 // "parameterOrder": [ 6789 // "name" 6790 // ], 6791 // "parameters": { 6792 // "name": { 6793 // "description": "Required. The name of the android app data stream to delete. Format: properties/{property_id}/androidAppDataStreams/{stream_id} Example: \"properties/123/androidAppDataStreams/456\"", 6794 // "location": "path", 6795 // "pattern": "^properties/[^/]+/androidAppDataStreams/[^/]+$", 6796 // "required": true, 6797 // "type": "string" 6798 // } 6799 // }, 6800 // "path": "v1alpha/{+name}", 6801 // "response": { 6802 // "$ref": "GoogleProtobufEmpty" 6803 // }, 6804 // "scopes": [ 6805 // "https://www.googleapis.com/auth/analytics.edit" 6806 // ] 6807 // } 6808 6809} 6810 6811// method id "analyticsadmin.properties.androidAppDataStreams.get": 6812 6813type PropertiesAndroidAppDataStreamsGetCall struct { 6814 s *Service 6815 name string 6816 urlParams_ gensupport.URLParams 6817 ifNoneMatch_ string 6818 ctx_ context.Context 6819 header_ http.Header 6820} 6821 6822// Get: Lookup for a single AndroidAppDataStream 6823// 6824// - name: The name of the android app data stream to lookup. Format: 6825// properties/{property_id}/androidAppDataStreams/{stream_id} Example: 6826// "properties/123/androidAppDataStreams/456". 6827func (r *PropertiesAndroidAppDataStreamsService) Get(name string) *PropertiesAndroidAppDataStreamsGetCall { 6828 c := &PropertiesAndroidAppDataStreamsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6829 c.name = name 6830 return c 6831} 6832 6833// Fields allows partial responses to be retrieved. See 6834// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6835// for more information. 6836func (c *PropertiesAndroidAppDataStreamsGetCall) Fields(s ...googleapi.Field) *PropertiesAndroidAppDataStreamsGetCall { 6837 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6838 return c 6839} 6840 6841// IfNoneMatch sets the optional parameter which makes the operation 6842// fail if the object's ETag matches the given value. This is useful for 6843// getting updates only after the object has changed since the last 6844// request. Use googleapi.IsNotModified to check whether the response 6845// error from Do is the result of In-None-Match. 6846func (c *PropertiesAndroidAppDataStreamsGetCall) IfNoneMatch(entityTag string) *PropertiesAndroidAppDataStreamsGetCall { 6847 c.ifNoneMatch_ = entityTag 6848 return c 6849} 6850 6851// Context sets the context to be used in this call's Do method. Any 6852// pending HTTP request will be aborted if the provided context is 6853// canceled. 6854func (c *PropertiesAndroidAppDataStreamsGetCall) Context(ctx context.Context) *PropertiesAndroidAppDataStreamsGetCall { 6855 c.ctx_ = ctx 6856 return c 6857} 6858 6859// Header returns an http.Header that can be modified by the caller to 6860// add HTTP headers to the request. 6861func (c *PropertiesAndroidAppDataStreamsGetCall) Header() http.Header { 6862 if c.header_ == nil { 6863 c.header_ = make(http.Header) 6864 } 6865 return c.header_ 6866} 6867 6868func (c *PropertiesAndroidAppDataStreamsGetCall) doRequest(alt string) (*http.Response, error) { 6869 reqHeaders := make(http.Header) 6870 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 6871 for k, v := range c.header_ { 6872 reqHeaders[k] = v 6873 } 6874 reqHeaders.Set("User-Agent", c.s.userAgent()) 6875 if c.ifNoneMatch_ != "" { 6876 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6877 } 6878 var body io.Reader = nil 6879 c.urlParams_.Set("alt", alt) 6880 c.urlParams_.Set("prettyPrint", "false") 6881 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 6882 urls += "?" + c.urlParams_.Encode() 6883 req, err := http.NewRequest("GET", urls, body) 6884 if err != nil { 6885 return nil, err 6886 } 6887 req.Header = reqHeaders 6888 googleapi.Expand(req.URL, map[string]string{ 6889 "name": c.name, 6890 }) 6891 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6892} 6893 6894// Do executes the "analyticsadmin.properties.androidAppDataStreams.get" call. 6895// Exactly one of *GoogleAnalyticsAdminV1alphaAndroidAppDataStream or 6896// error will be non-nil. Any non-2xx status code is an error. Response 6897// headers are in either 6898// *GoogleAnalyticsAdminV1alphaAndroidAppDataStream.ServerResponse.Header 6899// or (if a response was returned at all) in 6900// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6901// whether the returned error was because http.StatusNotModified was 6902// returned. 6903func (c *PropertiesAndroidAppDataStreamsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAndroidAppDataStream, error) { 6904 gensupport.SetOptions(c.urlParams_, opts...) 6905 res, err := c.doRequest("json") 6906 if res != nil && res.StatusCode == http.StatusNotModified { 6907 if res.Body != nil { 6908 res.Body.Close() 6909 } 6910 return nil, &googleapi.Error{ 6911 Code: res.StatusCode, 6912 Header: res.Header, 6913 } 6914 } 6915 if err != nil { 6916 return nil, err 6917 } 6918 defer googleapi.CloseBody(res) 6919 if err := googleapi.CheckResponse(res); err != nil { 6920 return nil, err 6921 } 6922 ret := &GoogleAnalyticsAdminV1alphaAndroidAppDataStream{ 6923 ServerResponse: googleapi.ServerResponse{ 6924 Header: res.Header, 6925 HTTPStatusCode: res.StatusCode, 6926 }, 6927 } 6928 target := &ret 6929 if err := gensupport.DecodeResponse(target, res); err != nil { 6930 return nil, err 6931 } 6932 return ret, nil 6933 // { 6934 // "description": "Lookup for a single AndroidAppDataStream", 6935 // "flatPath": "v1alpha/properties/{propertiesId}/androidAppDataStreams/{androidAppDataStreamsId}", 6936 // "httpMethod": "GET", 6937 // "id": "analyticsadmin.properties.androidAppDataStreams.get", 6938 // "parameterOrder": [ 6939 // "name" 6940 // ], 6941 // "parameters": { 6942 // "name": { 6943 // "description": "Required. The name of the android app data stream to lookup. Format: properties/{property_id}/androidAppDataStreams/{stream_id} Example: \"properties/123/androidAppDataStreams/456\"", 6944 // "location": "path", 6945 // "pattern": "^properties/[^/]+/androidAppDataStreams/[^/]+$", 6946 // "required": true, 6947 // "type": "string" 6948 // } 6949 // }, 6950 // "path": "v1alpha/{+name}", 6951 // "response": { 6952 // "$ref": "GoogleAnalyticsAdminV1alphaAndroidAppDataStream" 6953 // }, 6954 // "scopes": [ 6955 // "https://www.googleapis.com/auth/analytics.edit", 6956 // "https://www.googleapis.com/auth/analytics.readonly" 6957 // ] 6958 // } 6959 6960} 6961 6962// method id "analyticsadmin.properties.androidAppDataStreams.list": 6963 6964type PropertiesAndroidAppDataStreamsListCall struct { 6965 s *Service 6966 parent string 6967 urlParams_ gensupport.URLParams 6968 ifNoneMatch_ string 6969 ctx_ context.Context 6970 header_ http.Header 6971} 6972 6973// List: Returns child android app streams under the specified parent 6974// property. Android app streams will be excluded if the caller does not 6975// have access. Returns an empty list if no relevant android app streams 6976// are found. 6977// 6978// - parent: The name of the parent property. For example, to limit 6979// results to app streams under the property with Id 123: 6980// "properties/123". 6981func (r *PropertiesAndroidAppDataStreamsService) List(parent string) *PropertiesAndroidAppDataStreamsListCall { 6982 c := &PropertiesAndroidAppDataStreamsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6983 c.parent = parent 6984 return c 6985} 6986 6987// PageSize sets the optional parameter "pageSize": The maximum number 6988// of resources to return. If unspecified, at most 50 resources will be 6989// returned. The maximum value is 200; (higher values will be coerced to 6990// the maximum) 6991func (c *PropertiesAndroidAppDataStreamsListCall) PageSize(pageSize int64) *PropertiesAndroidAppDataStreamsListCall { 6992 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 6993 return c 6994} 6995 6996// PageToken sets the optional parameter "pageToken": A page token, 6997// received from a previous call. Provide this to retrieve the 6998// subsequent page. When paginating, all other parameters provided to 6999// `ListAndroidAppDataStreams` must match the call that provided the 7000// page token. 7001func (c *PropertiesAndroidAppDataStreamsListCall) PageToken(pageToken string) *PropertiesAndroidAppDataStreamsListCall { 7002 c.urlParams_.Set("pageToken", pageToken) 7003 return c 7004} 7005 7006// Fields allows partial responses to be retrieved. See 7007// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7008// for more information. 7009func (c *PropertiesAndroidAppDataStreamsListCall) Fields(s ...googleapi.Field) *PropertiesAndroidAppDataStreamsListCall { 7010 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7011 return c 7012} 7013 7014// IfNoneMatch sets the optional parameter which makes the operation 7015// fail if the object's ETag matches the given value. This is useful for 7016// getting updates only after the object has changed since the last 7017// request. Use googleapi.IsNotModified to check whether the response 7018// error from Do is the result of In-None-Match. 7019func (c *PropertiesAndroidAppDataStreamsListCall) IfNoneMatch(entityTag string) *PropertiesAndroidAppDataStreamsListCall { 7020 c.ifNoneMatch_ = entityTag 7021 return c 7022} 7023 7024// Context sets the context to be used in this call's Do method. Any 7025// pending HTTP request will be aborted if the provided context is 7026// canceled. 7027func (c *PropertiesAndroidAppDataStreamsListCall) Context(ctx context.Context) *PropertiesAndroidAppDataStreamsListCall { 7028 c.ctx_ = ctx 7029 return c 7030} 7031 7032// Header returns an http.Header that can be modified by the caller to 7033// add HTTP headers to the request. 7034func (c *PropertiesAndroidAppDataStreamsListCall) Header() http.Header { 7035 if c.header_ == nil { 7036 c.header_ = make(http.Header) 7037 } 7038 return c.header_ 7039} 7040 7041func (c *PropertiesAndroidAppDataStreamsListCall) doRequest(alt string) (*http.Response, error) { 7042 reqHeaders := make(http.Header) 7043 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7044 for k, v := range c.header_ { 7045 reqHeaders[k] = v 7046 } 7047 reqHeaders.Set("User-Agent", c.s.userAgent()) 7048 if c.ifNoneMatch_ != "" { 7049 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7050 } 7051 var body io.Reader = nil 7052 c.urlParams_.Set("alt", alt) 7053 c.urlParams_.Set("prettyPrint", "false") 7054 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/androidAppDataStreams") 7055 urls += "?" + c.urlParams_.Encode() 7056 req, err := http.NewRequest("GET", urls, body) 7057 if err != nil { 7058 return nil, err 7059 } 7060 req.Header = reqHeaders 7061 googleapi.Expand(req.URL, map[string]string{ 7062 "parent": c.parent, 7063 }) 7064 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7065} 7066 7067// Do executes the "analyticsadmin.properties.androidAppDataStreams.list" call. 7068// Exactly one of 7069// *GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse or 7070// error will be non-nil. Any non-2xx status code is an error. Response 7071// headers are in either 7072// *GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse.ServerRe 7073// sponse.Header or (if a response was returned at all) in 7074// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7075// whether the returned error was because http.StatusNotModified was 7076// returned. 7077func (c *PropertiesAndroidAppDataStreamsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse, error) { 7078 gensupport.SetOptions(c.urlParams_, opts...) 7079 res, err := c.doRequest("json") 7080 if res != nil && res.StatusCode == http.StatusNotModified { 7081 if res.Body != nil { 7082 res.Body.Close() 7083 } 7084 return nil, &googleapi.Error{ 7085 Code: res.StatusCode, 7086 Header: res.Header, 7087 } 7088 } 7089 if err != nil { 7090 return nil, err 7091 } 7092 defer googleapi.CloseBody(res) 7093 if err := googleapi.CheckResponse(res); err != nil { 7094 return nil, err 7095 } 7096 ret := &GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse{ 7097 ServerResponse: googleapi.ServerResponse{ 7098 Header: res.Header, 7099 HTTPStatusCode: res.StatusCode, 7100 }, 7101 } 7102 target := &ret 7103 if err := gensupport.DecodeResponse(target, res); err != nil { 7104 return nil, err 7105 } 7106 return ret, nil 7107 // { 7108 // "description": "Returns child android app streams under the specified parent property. Android app streams will be excluded if the caller does not have access. Returns an empty list if no relevant android app streams are found.", 7109 // "flatPath": "v1alpha/properties/{propertiesId}/androidAppDataStreams", 7110 // "httpMethod": "GET", 7111 // "id": "analyticsadmin.properties.androidAppDataStreams.list", 7112 // "parameterOrder": [ 7113 // "parent" 7114 // ], 7115 // "parameters": { 7116 // "pageSize": { 7117 // "description": "The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)", 7118 // "format": "int32", 7119 // "location": "query", 7120 // "type": "integer" 7121 // }, 7122 // "pageToken": { 7123 // "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAndroidAppDataStreams` must match the call that provided the page token.", 7124 // "location": "query", 7125 // "type": "string" 7126 // }, 7127 // "parent": { 7128 // "description": "Required. The name of the parent property. For example, to limit results to app streams under the property with Id 123: \"properties/123\"", 7129 // "location": "path", 7130 // "pattern": "^properties/[^/]+$", 7131 // "required": true, 7132 // "type": "string" 7133 // } 7134 // }, 7135 // "path": "v1alpha/{+parent}/androidAppDataStreams", 7136 // "response": { 7137 // "$ref": "GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse" 7138 // }, 7139 // "scopes": [ 7140 // "https://www.googleapis.com/auth/analytics.edit", 7141 // "https://www.googleapis.com/auth/analytics.readonly" 7142 // ] 7143 // } 7144 7145} 7146 7147// Pages invokes f for each page of results. 7148// A non-nil error returned from f will halt the iteration. 7149// The provided context supersedes any context provided to the Context method. 7150func (c *PropertiesAndroidAppDataStreamsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse) error) error { 7151 c.ctx_ = ctx 7152 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 7153 for { 7154 x, err := c.Do() 7155 if err != nil { 7156 return err 7157 } 7158 if err := f(x); err != nil { 7159 return err 7160 } 7161 if x.NextPageToken == "" { 7162 return nil 7163 } 7164 c.PageToken(x.NextPageToken) 7165 } 7166} 7167 7168// method id "analyticsadmin.properties.androidAppDataStreams.patch": 7169 7170type PropertiesAndroidAppDataStreamsPatchCall struct { 7171 s *Service 7172 name string 7173 googleanalyticsadminv1alphaandroidappdatastream *GoogleAnalyticsAdminV1alphaAndroidAppDataStream 7174 urlParams_ gensupport.URLParams 7175 ctx_ context.Context 7176 header_ http.Header 7177} 7178 7179// Patch: Updates an android app stream on a property. 7180// 7181// - name: Output only. Resource name of this Data Stream. Format: 7182// properties/{property_id}/androidAppDataStreams/{stream_id} Example: 7183// "properties/1000/androidAppDataStreams/2000". 7184func (r *PropertiesAndroidAppDataStreamsService) Patch(name string, googleanalyticsadminv1alphaandroidappdatastream *GoogleAnalyticsAdminV1alphaAndroidAppDataStream) *PropertiesAndroidAppDataStreamsPatchCall { 7185 c := &PropertiesAndroidAppDataStreamsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7186 c.name = name 7187 c.googleanalyticsadminv1alphaandroidappdatastream = googleanalyticsadminv1alphaandroidappdatastream 7188 return c 7189} 7190 7191// UpdateMask sets the optional parameter "updateMask": Required. The 7192// list of fields to be updated. Field names must be in snake case 7193// (e.g., "field_to_update"). Omitted fields will not be updated. To 7194// replace the entire entity, use one path with the string "*" to match 7195// all fields. 7196func (c *PropertiesAndroidAppDataStreamsPatchCall) UpdateMask(updateMask string) *PropertiesAndroidAppDataStreamsPatchCall { 7197 c.urlParams_.Set("updateMask", updateMask) 7198 return c 7199} 7200 7201// Fields allows partial responses to be retrieved. See 7202// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7203// for more information. 7204func (c *PropertiesAndroidAppDataStreamsPatchCall) Fields(s ...googleapi.Field) *PropertiesAndroidAppDataStreamsPatchCall { 7205 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7206 return c 7207} 7208 7209// Context sets the context to be used in this call's Do method. Any 7210// pending HTTP request will be aborted if the provided context is 7211// canceled. 7212func (c *PropertiesAndroidAppDataStreamsPatchCall) Context(ctx context.Context) *PropertiesAndroidAppDataStreamsPatchCall { 7213 c.ctx_ = ctx 7214 return c 7215} 7216 7217// Header returns an http.Header that can be modified by the caller to 7218// add HTTP headers to the request. 7219func (c *PropertiesAndroidAppDataStreamsPatchCall) Header() http.Header { 7220 if c.header_ == nil { 7221 c.header_ = make(http.Header) 7222 } 7223 return c.header_ 7224} 7225 7226func (c *PropertiesAndroidAppDataStreamsPatchCall) doRequest(alt string) (*http.Response, error) { 7227 reqHeaders := make(http.Header) 7228 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7229 for k, v := range c.header_ { 7230 reqHeaders[k] = v 7231 } 7232 reqHeaders.Set("User-Agent", c.s.userAgent()) 7233 var body io.Reader = nil 7234 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaandroidappdatastream) 7235 if err != nil { 7236 return nil, err 7237 } 7238 reqHeaders.Set("Content-Type", "application/json") 7239 c.urlParams_.Set("alt", alt) 7240 c.urlParams_.Set("prettyPrint", "false") 7241 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 7242 urls += "?" + c.urlParams_.Encode() 7243 req, err := http.NewRequest("PATCH", urls, body) 7244 if err != nil { 7245 return nil, err 7246 } 7247 req.Header = reqHeaders 7248 googleapi.Expand(req.URL, map[string]string{ 7249 "name": c.name, 7250 }) 7251 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7252} 7253 7254// Do executes the "analyticsadmin.properties.androidAppDataStreams.patch" call. 7255// Exactly one of *GoogleAnalyticsAdminV1alphaAndroidAppDataStream or 7256// error will be non-nil. Any non-2xx status code is an error. Response 7257// headers are in either 7258// *GoogleAnalyticsAdminV1alphaAndroidAppDataStream.ServerResponse.Header 7259// or (if a response was returned at all) in 7260// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7261// whether the returned error was because http.StatusNotModified was 7262// returned. 7263func (c *PropertiesAndroidAppDataStreamsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAndroidAppDataStream, error) { 7264 gensupport.SetOptions(c.urlParams_, opts...) 7265 res, err := c.doRequest("json") 7266 if res != nil && res.StatusCode == http.StatusNotModified { 7267 if res.Body != nil { 7268 res.Body.Close() 7269 } 7270 return nil, &googleapi.Error{ 7271 Code: res.StatusCode, 7272 Header: res.Header, 7273 } 7274 } 7275 if err != nil { 7276 return nil, err 7277 } 7278 defer googleapi.CloseBody(res) 7279 if err := googleapi.CheckResponse(res); err != nil { 7280 return nil, err 7281 } 7282 ret := &GoogleAnalyticsAdminV1alphaAndroidAppDataStream{ 7283 ServerResponse: googleapi.ServerResponse{ 7284 Header: res.Header, 7285 HTTPStatusCode: res.StatusCode, 7286 }, 7287 } 7288 target := &ret 7289 if err := gensupport.DecodeResponse(target, res); err != nil { 7290 return nil, err 7291 } 7292 return ret, nil 7293 // { 7294 // "description": "Updates an android app stream on a property.", 7295 // "flatPath": "v1alpha/properties/{propertiesId}/androidAppDataStreams/{androidAppDataStreamsId}", 7296 // "httpMethod": "PATCH", 7297 // "id": "analyticsadmin.properties.androidAppDataStreams.patch", 7298 // "parameterOrder": [ 7299 // "name" 7300 // ], 7301 // "parameters": { 7302 // "name": { 7303 // "description": "Output only. Resource name of this Data Stream. Format: properties/{property_id}/androidAppDataStreams/{stream_id} Example: \"properties/1000/androidAppDataStreams/2000\"", 7304 // "location": "path", 7305 // "pattern": "^properties/[^/]+/androidAppDataStreams/[^/]+$", 7306 // "required": true, 7307 // "type": "string" 7308 // }, 7309 // "updateMask": { 7310 // "description": "Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the entire entity, use one path with the string \"*\" to match all fields.", 7311 // "format": "google-fieldmask", 7312 // "location": "query", 7313 // "type": "string" 7314 // } 7315 // }, 7316 // "path": "v1alpha/{+name}", 7317 // "request": { 7318 // "$ref": "GoogleAnalyticsAdminV1alphaAndroidAppDataStream" 7319 // }, 7320 // "response": { 7321 // "$ref": "GoogleAnalyticsAdminV1alphaAndroidAppDataStream" 7322 // }, 7323 // "scopes": [ 7324 // "https://www.googleapis.com/auth/analytics.edit" 7325 // ] 7326 // } 7327 7328} 7329 7330// method id "analyticsadmin.properties.androidAppDataStreams.measurementProtocolSecrets.create": 7331 7332type PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsCreateCall struct { 7333 s *Service 7334 parent string 7335 googleanalyticsadminv1alphameasurementprotocolsecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret 7336 urlParams_ gensupport.URLParams 7337 ctx_ context.Context 7338 header_ http.Header 7339} 7340 7341// Create: Creates a measurement protocol secret. 7342// 7343// - parent: The parent resource where this secret will be created. Any 7344// type of stream (WebDataStream, IosAppDataStream, 7345// AndroidAppDataStream) may be a parent. Format: 7346// properties/{property}/webDataStreams/{webDataStream}. 7347func (r *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsService) Create(parent string, googleanalyticsadminv1alphameasurementprotocolsecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret) *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsCreateCall { 7348 c := &PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7349 c.parent = parent 7350 c.googleanalyticsadminv1alphameasurementprotocolsecret = googleanalyticsadminv1alphameasurementprotocolsecret 7351 return c 7352} 7353 7354// Fields allows partial responses to be retrieved. See 7355// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7356// for more information. 7357func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsCreateCall) Fields(s ...googleapi.Field) *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsCreateCall { 7358 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7359 return c 7360} 7361 7362// Context sets the context to be used in this call's Do method. Any 7363// pending HTTP request will be aborted if the provided context is 7364// canceled. 7365func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsCreateCall) Context(ctx context.Context) *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsCreateCall { 7366 c.ctx_ = ctx 7367 return c 7368} 7369 7370// Header returns an http.Header that can be modified by the caller to 7371// add HTTP headers to the request. 7372func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsCreateCall) Header() http.Header { 7373 if c.header_ == nil { 7374 c.header_ = make(http.Header) 7375 } 7376 return c.header_ 7377} 7378 7379func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsCreateCall) doRequest(alt string) (*http.Response, error) { 7380 reqHeaders := make(http.Header) 7381 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7382 for k, v := range c.header_ { 7383 reqHeaders[k] = v 7384 } 7385 reqHeaders.Set("User-Agent", c.s.userAgent()) 7386 var body io.Reader = nil 7387 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphameasurementprotocolsecret) 7388 if err != nil { 7389 return nil, err 7390 } 7391 reqHeaders.Set("Content-Type", "application/json") 7392 c.urlParams_.Set("alt", alt) 7393 c.urlParams_.Set("prettyPrint", "false") 7394 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/measurementProtocolSecrets") 7395 urls += "?" + c.urlParams_.Encode() 7396 req, err := http.NewRequest("POST", urls, body) 7397 if err != nil { 7398 return nil, err 7399 } 7400 req.Header = reqHeaders 7401 googleapi.Expand(req.URL, map[string]string{ 7402 "parent": c.parent, 7403 }) 7404 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7405} 7406 7407// Do executes the "analyticsadmin.properties.androidAppDataStreams.measurementProtocolSecrets.create" call. 7408// Exactly one of *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret 7409// or error will be non-nil. Any non-2xx status code is an error. 7410// Response headers are in either 7411// *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret.ServerResponse.H 7412// eader or (if a response was returned at all) in 7413// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7414// whether the returned error was because http.StatusNotModified was 7415// returned. 7416func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret, error) { 7417 gensupport.SetOptions(c.urlParams_, opts...) 7418 res, err := c.doRequest("json") 7419 if res != nil && res.StatusCode == http.StatusNotModified { 7420 if res.Body != nil { 7421 res.Body.Close() 7422 } 7423 return nil, &googleapi.Error{ 7424 Code: res.StatusCode, 7425 Header: res.Header, 7426 } 7427 } 7428 if err != nil { 7429 return nil, err 7430 } 7431 defer googleapi.CloseBody(res) 7432 if err := googleapi.CheckResponse(res); err != nil { 7433 return nil, err 7434 } 7435 ret := &GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret{ 7436 ServerResponse: googleapi.ServerResponse{ 7437 Header: res.Header, 7438 HTTPStatusCode: res.StatusCode, 7439 }, 7440 } 7441 target := &ret 7442 if err := gensupport.DecodeResponse(target, res); err != nil { 7443 return nil, err 7444 } 7445 return ret, nil 7446 // { 7447 // "description": "Creates a measurement protocol secret.", 7448 // "flatPath": "v1alpha/properties/{propertiesId}/androidAppDataStreams/{androidAppDataStreamsId}/measurementProtocolSecrets", 7449 // "httpMethod": "POST", 7450 // "id": "analyticsadmin.properties.androidAppDataStreams.measurementProtocolSecrets.create", 7451 // "parameterOrder": [ 7452 // "parent" 7453 // ], 7454 // "parameters": { 7455 // "parent": { 7456 // "description": "Required. The parent resource where this secret will be created. Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent. Format: properties/{property}/webDataStreams/{webDataStream}", 7457 // "location": "path", 7458 // "pattern": "^properties/[^/]+/androidAppDataStreams/[^/]+$", 7459 // "required": true, 7460 // "type": "string" 7461 // } 7462 // }, 7463 // "path": "v1alpha/{+parent}/measurementProtocolSecrets", 7464 // "request": { 7465 // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" 7466 // }, 7467 // "response": { 7468 // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" 7469 // }, 7470 // "scopes": [ 7471 // "https://www.googleapis.com/auth/analytics.edit" 7472 // ] 7473 // } 7474 7475} 7476 7477// method id "analyticsadmin.properties.androidAppDataStreams.measurementProtocolSecrets.delete": 7478 7479type PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsDeleteCall struct { 7480 s *Service 7481 name string 7482 urlParams_ gensupport.URLParams 7483 ctx_ context.Context 7484 header_ http.Header 7485} 7486 7487// Delete: Deletes target MeasurementProtocolSecret. 7488// 7489// - name: The name of the MeasurementProtocolSecret to delete. Format: 7490// properties/{property}/webDataStreams/{webDataStream}/measurementProt 7491// ocolSecrets/{measurementProtocolSecret} Note: Any type of stream 7492// (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a 7493// parent. 7494func (r *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsService) Delete(name string) *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsDeleteCall { 7495 c := &PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7496 c.name = name 7497 return c 7498} 7499 7500// Fields allows partial responses to be retrieved. See 7501// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7502// for more information. 7503func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsDeleteCall) Fields(s ...googleapi.Field) *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsDeleteCall { 7504 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7505 return c 7506} 7507 7508// Context sets the context to be used in this call's Do method. Any 7509// pending HTTP request will be aborted if the provided context is 7510// canceled. 7511func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsDeleteCall) Context(ctx context.Context) *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsDeleteCall { 7512 c.ctx_ = ctx 7513 return c 7514} 7515 7516// Header returns an http.Header that can be modified by the caller to 7517// add HTTP headers to the request. 7518func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsDeleteCall) Header() http.Header { 7519 if c.header_ == nil { 7520 c.header_ = make(http.Header) 7521 } 7522 return c.header_ 7523} 7524 7525func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsDeleteCall) doRequest(alt string) (*http.Response, error) { 7526 reqHeaders := make(http.Header) 7527 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7528 for k, v := range c.header_ { 7529 reqHeaders[k] = v 7530 } 7531 reqHeaders.Set("User-Agent", c.s.userAgent()) 7532 var body io.Reader = nil 7533 c.urlParams_.Set("alt", alt) 7534 c.urlParams_.Set("prettyPrint", "false") 7535 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 7536 urls += "?" + c.urlParams_.Encode() 7537 req, err := http.NewRequest("DELETE", urls, body) 7538 if err != nil { 7539 return nil, err 7540 } 7541 req.Header = reqHeaders 7542 googleapi.Expand(req.URL, map[string]string{ 7543 "name": c.name, 7544 }) 7545 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7546} 7547 7548// Do executes the "analyticsadmin.properties.androidAppDataStreams.measurementProtocolSecrets.delete" call. 7549// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 7550// non-2xx status code is an error. Response headers are in either 7551// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 7552// returned at all) in error.(*googleapi.Error).Header. Use 7553// googleapi.IsNotModified to check whether the returned error was 7554// because http.StatusNotModified was returned. 7555func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 7556 gensupport.SetOptions(c.urlParams_, opts...) 7557 res, err := c.doRequest("json") 7558 if res != nil && res.StatusCode == http.StatusNotModified { 7559 if res.Body != nil { 7560 res.Body.Close() 7561 } 7562 return nil, &googleapi.Error{ 7563 Code: res.StatusCode, 7564 Header: res.Header, 7565 } 7566 } 7567 if err != nil { 7568 return nil, err 7569 } 7570 defer googleapi.CloseBody(res) 7571 if err := googleapi.CheckResponse(res); err != nil { 7572 return nil, err 7573 } 7574 ret := &GoogleProtobufEmpty{ 7575 ServerResponse: googleapi.ServerResponse{ 7576 Header: res.Header, 7577 HTTPStatusCode: res.StatusCode, 7578 }, 7579 } 7580 target := &ret 7581 if err := gensupport.DecodeResponse(target, res); err != nil { 7582 return nil, err 7583 } 7584 return ret, nil 7585 // { 7586 // "description": "Deletes target MeasurementProtocolSecret.", 7587 // "flatPath": "v1alpha/properties/{propertiesId}/androidAppDataStreams/{androidAppDataStreamsId}/measurementProtocolSecrets/{measurementProtocolSecretsId}", 7588 // "httpMethod": "DELETE", 7589 // "id": "analyticsadmin.properties.androidAppDataStreams.measurementProtocolSecrets.delete", 7590 // "parameterOrder": [ 7591 // "name" 7592 // ], 7593 // "parameters": { 7594 // "name": { 7595 // "description": "Required. The name of the MeasurementProtocolSecret to delete. Format: properties/{property}/webDataStreams/{webDataStream}/measurementProtocolSecrets/{measurementProtocolSecret} Note: Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent.", 7596 // "location": "path", 7597 // "pattern": "^properties/[^/]+/androidAppDataStreams/[^/]+/measurementProtocolSecrets/[^/]+$", 7598 // "required": true, 7599 // "type": "string" 7600 // } 7601 // }, 7602 // "path": "v1alpha/{+name}", 7603 // "response": { 7604 // "$ref": "GoogleProtobufEmpty" 7605 // }, 7606 // "scopes": [ 7607 // "https://www.googleapis.com/auth/analytics.edit" 7608 // ] 7609 // } 7610 7611} 7612 7613// method id "analyticsadmin.properties.androidAppDataStreams.measurementProtocolSecrets.get": 7614 7615type PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsGetCall struct { 7616 s *Service 7617 name string 7618 urlParams_ gensupport.URLParams 7619 ifNoneMatch_ string 7620 ctx_ context.Context 7621 header_ http.Header 7622} 7623 7624// Get: Lookup for a single "GA4" MeasurementProtocolSecret. 7625// 7626// - name: The name of the measurement protocol secret to lookup. 7627// Format: 7628// properties/{property}/webDataStreams/{webDataStream}/measurementProt 7629// ocolSecrets/{measurementProtocolSecret} Note: Any type of stream 7630// (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a 7631// parent. 7632func (r *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsService) Get(name string) *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsGetCall { 7633 c := &PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7634 c.name = name 7635 return c 7636} 7637 7638// Fields allows partial responses to be retrieved. See 7639// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7640// for more information. 7641func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsGetCall) Fields(s ...googleapi.Field) *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsGetCall { 7642 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7643 return c 7644} 7645 7646// IfNoneMatch sets the optional parameter which makes the operation 7647// fail if the object's ETag matches the given value. This is useful for 7648// getting updates only after the object has changed since the last 7649// request. Use googleapi.IsNotModified to check whether the response 7650// error from Do is the result of In-None-Match. 7651func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsGetCall) IfNoneMatch(entityTag string) *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsGetCall { 7652 c.ifNoneMatch_ = entityTag 7653 return c 7654} 7655 7656// Context sets the context to be used in this call's Do method. Any 7657// pending HTTP request will be aborted if the provided context is 7658// canceled. 7659func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsGetCall) Context(ctx context.Context) *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsGetCall { 7660 c.ctx_ = ctx 7661 return c 7662} 7663 7664// Header returns an http.Header that can be modified by the caller to 7665// add HTTP headers to the request. 7666func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsGetCall) Header() http.Header { 7667 if c.header_ == nil { 7668 c.header_ = make(http.Header) 7669 } 7670 return c.header_ 7671} 7672 7673func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsGetCall) doRequest(alt string) (*http.Response, error) { 7674 reqHeaders := make(http.Header) 7675 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7676 for k, v := range c.header_ { 7677 reqHeaders[k] = v 7678 } 7679 reqHeaders.Set("User-Agent", c.s.userAgent()) 7680 if c.ifNoneMatch_ != "" { 7681 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7682 } 7683 var body io.Reader = nil 7684 c.urlParams_.Set("alt", alt) 7685 c.urlParams_.Set("prettyPrint", "false") 7686 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 7687 urls += "?" + c.urlParams_.Encode() 7688 req, err := http.NewRequest("GET", urls, body) 7689 if err != nil { 7690 return nil, err 7691 } 7692 req.Header = reqHeaders 7693 googleapi.Expand(req.URL, map[string]string{ 7694 "name": c.name, 7695 }) 7696 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7697} 7698 7699// Do executes the "analyticsadmin.properties.androidAppDataStreams.measurementProtocolSecrets.get" call. 7700// Exactly one of *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret 7701// or error will be non-nil. Any non-2xx status code is an error. 7702// Response headers are in either 7703// *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret.ServerResponse.H 7704// eader or (if a response was returned at all) in 7705// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7706// whether the returned error was because http.StatusNotModified was 7707// returned. 7708func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret, error) { 7709 gensupport.SetOptions(c.urlParams_, opts...) 7710 res, err := c.doRequest("json") 7711 if res != nil && res.StatusCode == http.StatusNotModified { 7712 if res.Body != nil { 7713 res.Body.Close() 7714 } 7715 return nil, &googleapi.Error{ 7716 Code: res.StatusCode, 7717 Header: res.Header, 7718 } 7719 } 7720 if err != nil { 7721 return nil, err 7722 } 7723 defer googleapi.CloseBody(res) 7724 if err := googleapi.CheckResponse(res); err != nil { 7725 return nil, err 7726 } 7727 ret := &GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret{ 7728 ServerResponse: googleapi.ServerResponse{ 7729 Header: res.Header, 7730 HTTPStatusCode: res.StatusCode, 7731 }, 7732 } 7733 target := &ret 7734 if err := gensupport.DecodeResponse(target, res); err != nil { 7735 return nil, err 7736 } 7737 return ret, nil 7738 // { 7739 // "description": "Lookup for a single \"GA4\" MeasurementProtocolSecret.", 7740 // "flatPath": "v1alpha/properties/{propertiesId}/androidAppDataStreams/{androidAppDataStreamsId}/measurementProtocolSecrets/{measurementProtocolSecretsId}", 7741 // "httpMethod": "GET", 7742 // "id": "analyticsadmin.properties.androidAppDataStreams.measurementProtocolSecrets.get", 7743 // "parameterOrder": [ 7744 // "name" 7745 // ], 7746 // "parameters": { 7747 // "name": { 7748 // "description": "Required. The name of the measurement protocol secret to lookup. Format: properties/{property}/webDataStreams/{webDataStream}/measurementProtocolSecrets/{measurementProtocolSecret} Note: Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent.", 7749 // "location": "path", 7750 // "pattern": "^properties/[^/]+/androidAppDataStreams/[^/]+/measurementProtocolSecrets/[^/]+$", 7751 // "required": true, 7752 // "type": "string" 7753 // } 7754 // }, 7755 // "path": "v1alpha/{+name}", 7756 // "response": { 7757 // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" 7758 // }, 7759 // "scopes": [ 7760 // "https://www.googleapis.com/auth/analytics.edit", 7761 // "https://www.googleapis.com/auth/analytics.readonly" 7762 // ] 7763 // } 7764 7765} 7766 7767// method id "analyticsadmin.properties.androidAppDataStreams.measurementProtocolSecrets.list": 7768 7769type PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsListCall struct { 7770 s *Service 7771 parent string 7772 urlParams_ gensupport.URLParams 7773 ifNoneMatch_ string 7774 ctx_ context.Context 7775 header_ http.Header 7776} 7777 7778// List: Returns child MeasurementProtocolSecrets under the specified 7779// parent Property. 7780// 7781// - parent: The resource name of the parent stream. Any type of stream 7782// (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a 7783// parent. Format: 7784// properties/{property}/webDataStreams/{webDataStream}/measurementProt 7785// ocolSecrets. 7786func (r *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsService) List(parent string) *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsListCall { 7787 c := &PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7788 c.parent = parent 7789 return c 7790} 7791 7792// PageSize sets the optional parameter "pageSize": The maximum number 7793// of resources to return. If unspecified, at most 10 resources will be 7794// returned. The maximum value is 10. Higher values will be coerced to 7795// the maximum. 7796func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsListCall) PageSize(pageSize int64) *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsListCall { 7797 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7798 return c 7799} 7800 7801// PageToken sets the optional parameter "pageToken": A page token, 7802// received from a previous `ListMeasurementProtocolSecrets` call. 7803// Provide this to retrieve the subsequent page. When paginating, all 7804// other parameters provided to `ListMeasurementProtocolSecrets` must 7805// match the call that provided the page token. 7806func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsListCall) PageToken(pageToken string) *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsListCall { 7807 c.urlParams_.Set("pageToken", pageToken) 7808 return c 7809} 7810 7811// Fields allows partial responses to be retrieved. See 7812// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7813// for more information. 7814func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsListCall) Fields(s ...googleapi.Field) *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsListCall { 7815 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7816 return c 7817} 7818 7819// IfNoneMatch sets the optional parameter which makes the operation 7820// fail if the object's ETag matches the given value. This is useful for 7821// getting updates only after the object has changed since the last 7822// request. Use googleapi.IsNotModified to check whether the response 7823// error from Do is the result of In-None-Match. 7824func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsListCall) IfNoneMatch(entityTag string) *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsListCall { 7825 c.ifNoneMatch_ = entityTag 7826 return c 7827} 7828 7829// Context sets the context to be used in this call's Do method. Any 7830// pending HTTP request will be aborted if the provided context is 7831// canceled. 7832func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsListCall) Context(ctx context.Context) *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsListCall { 7833 c.ctx_ = ctx 7834 return c 7835} 7836 7837// Header returns an http.Header that can be modified by the caller to 7838// add HTTP headers to the request. 7839func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsListCall) Header() http.Header { 7840 if c.header_ == nil { 7841 c.header_ = make(http.Header) 7842 } 7843 return c.header_ 7844} 7845 7846func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsListCall) doRequest(alt string) (*http.Response, error) { 7847 reqHeaders := make(http.Header) 7848 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 7849 for k, v := range c.header_ { 7850 reqHeaders[k] = v 7851 } 7852 reqHeaders.Set("User-Agent", c.s.userAgent()) 7853 if c.ifNoneMatch_ != "" { 7854 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7855 } 7856 var body io.Reader = nil 7857 c.urlParams_.Set("alt", alt) 7858 c.urlParams_.Set("prettyPrint", "false") 7859 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/measurementProtocolSecrets") 7860 urls += "?" + c.urlParams_.Encode() 7861 req, err := http.NewRequest("GET", urls, body) 7862 if err != nil { 7863 return nil, err 7864 } 7865 req.Header = reqHeaders 7866 googleapi.Expand(req.URL, map[string]string{ 7867 "parent": c.parent, 7868 }) 7869 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7870} 7871 7872// Do executes the "analyticsadmin.properties.androidAppDataStreams.measurementProtocolSecrets.list" call. 7873// Exactly one of 7874// *GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse or 7875// error will be non-nil. Any non-2xx status code is an error. Response 7876// headers are in either 7877// *GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse.Ser 7878// verResponse.Header or (if a response was returned at all) in 7879// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7880// whether the returned error was because http.StatusNotModified was 7881// returned. 7882func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse, error) { 7883 gensupport.SetOptions(c.urlParams_, opts...) 7884 res, err := c.doRequest("json") 7885 if res != nil && res.StatusCode == http.StatusNotModified { 7886 if res.Body != nil { 7887 res.Body.Close() 7888 } 7889 return nil, &googleapi.Error{ 7890 Code: res.StatusCode, 7891 Header: res.Header, 7892 } 7893 } 7894 if err != nil { 7895 return nil, err 7896 } 7897 defer googleapi.CloseBody(res) 7898 if err := googleapi.CheckResponse(res); err != nil { 7899 return nil, err 7900 } 7901 ret := &GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse{ 7902 ServerResponse: googleapi.ServerResponse{ 7903 Header: res.Header, 7904 HTTPStatusCode: res.StatusCode, 7905 }, 7906 } 7907 target := &ret 7908 if err := gensupport.DecodeResponse(target, res); err != nil { 7909 return nil, err 7910 } 7911 return ret, nil 7912 // { 7913 // "description": "Returns child MeasurementProtocolSecrets under the specified parent Property.", 7914 // "flatPath": "v1alpha/properties/{propertiesId}/androidAppDataStreams/{androidAppDataStreamsId}/measurementProtocolSecrets", 7915 // "httpMethod": "GET", 7916 // "id": "analyticsadmin.properties.androidAppDataStreams.measurementProtocolSecrets.list", 7917 // "parameterOrder": [ 7918 // "parent" 7919 // ], 7920 // "parameters": { 7921 // "pageSize": { 7922 // "description": "The maximum number of resources to return. If unspecified, at most 10 resources will be returned. The maximum value is 10. Higher values will be coerced to the maximum.", 7923 // "format": "int32", 7924 // "location": "query", 7925 // "type": "integer" 7926 // }, 7927 // "pageToken": { 7928 // "description": "A page token, received from a previous `ListMeasurementProtocolSecrets` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListMeasurementProtocolSecrets` must match the call that provided the page token.", 7929 // "location": "query", 7930 // "type": "string" 7931 // }, 7932 // "parent": { 7933 // "description": "Required. The resource name of the parent stream. Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent. Format: properties/{property}/webDataStreams/{webDataStream}/measurementProtocolSecrets", 7934 // "location": "path", 7935 // "pattern": "^properties/[^/]+/androidAppDataStreams/[^/]+$", 7936 // "required": true, 7937 // "type": "string" 7938 // } 7939 // }, 7940 // "path": "v1alpha/{+parent}/measurementProtocolSecrets", 7941 // "response": { 7942 // "$ref": "GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse" 7943 // }, 7944 // "scopes": [ 7945 // "https://www.googleapis.com/auth/analytics.edit", 7946 // "https://www.googleapis.com/auth/analytics.readonly" 7947 // ] 7948 // } 7949 7950} 7951 7952// Pages invokes f for each page of results. 7953// A non-nil error returned from f will halt the iteration. 7954// The provided context supersedes any context provided to the Context method. 7955func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse) error) error { 7956 c.ctx_ = ctx 7957 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 7958 for { 7959 x, err := c.Do() 7960 if err != nil { 7961 return err 7962 } 7963 if err := f(x); err != nil { 7964 return err 7965 } 7966 if x.NextPageToken == "" { 7967 return nil 7968 } 7969 c.PageToken(x.NextPageToken) 7970 } 7971} 7972 7973// method id "analyticsadmin.properties.androidAppDataStreams.measurementProtocolSecrets.patch": 7974 7975type PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsPatchCall struct { 7976 s *Service 7977 name string 7978 googleanalyticsadminv1alphameasurementprotocolsecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret 7979 urlParams_ gensupport.URLParams 7980 ctx_ context.Context 7981 header_ http.Header 7982} 7983 7984// Patch: Updates a measurement protocol secret. 7985// 7986// - name: Output only. Resource name of this secret. This secret may be 7987// a child of any type of stream. Format: 7988// properties/{property}/webDataStreams/{webDataStream}/measurementProt 7989// ocolSecrets/{measurementProtocolSecret}. 7990func (r *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsService) Patch(name string, googleanalyticsadminv1alphameasurementprotocolsecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret) *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsPatchCall { 7991 c := &PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7992 c.name = name 7993 c.googleanalyticsadminv1alphameasurementprotocolsecret = googleanalyticsadminv1alphameasurementprotocolsecret 7994 return c 7995} 7996 7997// UpdateMask sets the optional parameter "updateMask": The list of 7998// fields to be updated. Omitted fields will not be updated. 7999func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsPatchCall) UpdateMask(updateMask string) *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsPatchCall { 8000 c.urlParams_.Set("updateMask", updateMask) 8001 return c 8002} 8003 8004// Fields allows partial responses to be retrieved. See 8005// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8006// for more information. 8007func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsPatchCall) Fields(s ...googleapi.Field) *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsPatchCall { 8008 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8009 return c 8010} 8011 8012// Context sets the context to be used in this call's Do method. Any 8013// pending HTTP request will be aborted if the provided context is 8014// canceled. 8015func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsPatchCall) Context(ctx context.Context) *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsPatchCall { 8016 c.ctx_ = ctx 8017 return c 8018} 8019 8020// Header returns an http.Header that can be modified by the caller to 8021// add HTTP headers to the request. 8022func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsPatchCall) Header() http.Header { 8023 if c.header_ == nil { 8024 c.header_ = make(http.Header) 8025 } 8026 return c.header_ 8027} 8028 8029func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsPatchCall) doRequest(alt string) (*http.Response, error) { 8030 reqHeaders := make(http.Header) 8031 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8032 for k, v := range c.header_ { 8033 reqHeaders[k] = v 8034 } 8035 reqHeaders.Set("User-Agent", c.s.userAgent()) 8036 var body io.Reader = nil 8037 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphameasurementprotocolsecret) 8038 if err != nil { 8039 return nil, err 8040 } 8041 reqHeaders.Set("Content-Type", "application/json") 8042 c.urlParams_.Set("alt", alt) 8043 c.urlParams_.Set("prettyPrint", "false") 8044 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 8045 urls += "?" + c.urlParams_.Encode() 8046 req, err := http.NewRequest("PATCH", urls, body) 8047 if err != nil { 8048 return nil, err 8049 } 8050 req.Header = reqHeaders 8051 googleapi.Expand(req.URL, map[string]string{ 8052 "name": c.name, 8053 }) 8054 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8055} 8056 8057// Do executes the "analyticsadmin.properties.androidAppDataStreams.measurementProtocolSecrets.patch" call. 8058// Exactly one of *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret 8059// or error will be non-nil. Any non-2xx status code is an error. 8060// Response headers are in either 8061// *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret.ServerResponse.H 8062// eader or (if a response was returned at all) in 8063// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8064// whether the returned error was because http.StatusNotModified was 8065// returned. 8066func (c *PropertiesAndroidAppDataStreamsMeasurementProtocolSecretsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret, error) { 8067 gensupport.SetOptions(c.urlParams_, opts...) 8068 res, err := c.doRequest("json") 8069 if res != nil && res.StatusCode == http.StatusNotModified { 8070 if res.Body != nil { 8071 res.Body.Close() 8072 } 8073 return nil, &googleapi.Error{ 8074 Code: res.StatusCode, 8075 Header: res.Header, 8076 } 8077 } 8078 if err != nil { 8079 return nil, err 8080 } 8081 defer googleapi.CloseBody(res) 8082 if err := googleapi.CheckResponse(res); err != nil { 8083 return nil, err 8084 } 8085 ret := &GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret{ 8086 ServerResponse: googleapi.ServerResponse{ 8087 Header: res.Header, 8088 HTTPStatusCode: res.StatusCode, 8089 }, 8090 } 8091 target := &ret 8092 if err := gensupport.DecodeResponse(target, res); err != nil { 8093 return nil, err 8094 } 8095 return ret, nil 8096 // { 8097 // "description": "Updates a measurement protocol secret.", 8098 // "flatPath": "v1alpha/properties/{propertiesId}/androidAppDataStreams/{androidAppDataStreamsId}/measurementProtocolSecrets/{measurementProtocolSecretsId}", 8099 // "httpMethod": "PATCH", 8100 // "id": "analyticsadmin.properties.androidAppDataStreams.measurementProtocolSecrets.patch", 8101 // "parameterOrder": [ 8102 // "name" 8103 // ], 8104 // "parameters": { 8105 // "name": { 8106 // "description": "Output only. Resource name of this secret. This secret may be a child of any type of stream. Format: properties/{property}/webDataStreams/{webDataStream}/measurementProtocolSecrets/{measurementProtocolSecret}", 8107 // "location": "path", 8108 // "pattern": "^properties/[^/]+/androidAppDataStreams/[^/]+/measurementProtocolSecrets/[^/]+$", 8109 // "required": true, 8110 // "type": "string" 8111 // }, 8112 // "updateMask": { 8113 // "description": "The list of fields to be updated. Omitted fields will not be updated.", 8114 // "format": "google-fieldmask", 8115 // "location": "query", 8116 // "type": "string" 8117 // } 8118 // }, 8119 // "path": "v1alpha/{+name}", 8120 // "request": { 8121 // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" 8122 // }, 8123 // "response": { 8124 // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" 8125 // }, 8126 // "scopes": [ 8127 // "https://www.googleapis.com/auth/analytics.edit" 8128 // ] 8129 // } 8130 8131} 8132 8133// method id "analyticsadmin.properties.conversionEvents.create": 8134 8135type PropertiesConversionEventsCreateCall struct { 8136 s *Service 8137 parent string 8138 googleanalyticsadminv1alphaconversionevent *GoogleAnalyticsAdminV1alphaConversionEvent 8139 urlParams_ gensupport.URLParams 8140 ctx_ context.Context 8141 header_ http.Header 8142} 8143 8144// Create: Creates a conversion event with the specified attributes. 8145// 8146// - parent: The resource name of the parent property where this 8147// conversion event will be created. Format: properties/123. 8148func (r *PropertiesConversionEventsService) Create(parent string, googleanalyticsadminv1alphaconversionevent *GoogleAnalyticsAdminV1alphaConversionEvent) *PropertiesConversionEventsCreateCall { 8149 c := &PropertiesConversionEventsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8150 c.parent = parent 8151 c.googleanalyticsadminv1alphaconversionevent = googleanalyticsadminv1alphaconversionevent 8152 return c 8153} 8154 8155// Fields allows partial responses to be retrieved. See 8156// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8157// for more information. 8158func (c *PropertiesConversionEventsCreateCall) Fields(s ...googleapi.Field) *PropertiesConversionEventsCreateCall { 8159 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8160 return c 8161} 8162 8163// Context sets the context to be used in this call's Do method. Any 8164// pending HTTP request will be aborted if the provided context is 8165// canceled. 8166func (c *PropertiesConversionEventsCreateCall) Context(ctx context.Context) *PropertiesConversionEventsCreateCall { 8167 c.ctx_ = ctx 8168 return c 8169} 8170 8171// Header returns an http.Header that can be modified by the caller to 8172// add HTTP headers to the request. 8173func (c *PropertiesConversionEventsCreateCall) Header() http.Header { 8174 if c.header_ == nil { 8175 c.header_ = make(http.Header) 8176 } 8177 return c.header_ 8178} 8179 8180func (c *PropertiesConversionEventsCreateCall) doRequest(alt string) (*http.Response, error) { 8181 reqHeaders := make(http.Header) 8182 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8183 for k, v := range c.header_ { 8184 reqHeaders[k] = v 8185 } 8186 reqHeaders.Set("User-Agent", c.s.userAgent()) 8187 var body io.Reader = nil 8188 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaconversionevent) 8189 if err != nil { 8190 return nil, err 8191 } 8192 reqHeaders.Set("Content-Type", "application/json") 8193 c.urlParams_.Set("alt", alt) 8194 c.urlParams_.Set("prettyPrint", "false") 8195 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversionEvents") 8196 urls += "?" + c.urlParams_.Encode() 8197 req, err := http.NewRequest("POST", urls, body) 8198 if err != nil { 8199 return nil, err 8200 } 8201 req.Header = reqHeaders 8202 googleapi.Expand(req.URL, map[string]string{ 8203 "parent": c.parent, 8204 }) 8205 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8206} 8207 8208// Do executes the "analyticsadmin.properties.conversionEvents.create" call. 8209// Exactly one of *GoogleAnalyticsAdminV1alphaConversionEvent or error 8210// will be non-nil. Any non-2xx status code is an error. Response 8211// headers are in either 8212// *GoogleAnalyticsAdminV1alphaConversionEvent.ServerResponse.Header or 8213// (if a response was returned at all) in 8214// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8215// whether the returned error was because http.StatusNotModified was 8216// returned. 8217func (c *PropertiesConversionEventsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaConversionEvent, error) { 8218 gensupport.SetOptions(c.urlParams_, opts...) 8219 res, err := c.doRequest("json") 8220 if res != nil && res.StatusCode == http.StatusNotModified { 8221 if res.Body != nil { 8222 res.Body.Close() 8223 } 8224 return nil, &googleapi.Error{ 8225 Code: res.StatusCode, 8226 Header: res.Header, 8227 } 8228 } 8229 if err != nil { 8230 return nil, err 8231 } 8232 defer googleapi.CloseBody(res) 8233 if err := googleapi.CheckResponse(res); err != nil { 8234 return nil, err 8235 } 8236 ret := &GoogleAnalyticsAdminV1alphaConversionEvent{ 8237 ServerResponse: googleapi.ServerResponse{ 8238 Header: res.Header, 8239 HTTPStatusCode: res.StatusCode, 8240 }, 8241 } 8242 target := &ret 8243 if err := gensupport.DecodeResponse(target, res); err != nil { 8244 return nil, err 8245 } 8246 return ret, nil 8247 // { 8248 // "description": "Creates a conversion event with the specified attributes.", 8249 // "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents", 8250 // "httpMethod": "POST", 8251 // "id": "analyticsadmin.properties.conversionEvents.create", 8252 // "parameterOrder": [ 8253 // "parent" 8254 // ], 8255 // "parameters": { 8256 // "parent": { 8257 // "description": "Required. The resource name of the parent property where this conversion event will be created. Format: properties/123", 8258 // "location": "path", 8259 // "pattern": "^properties/[^/]+$", 8260 // "required": true, 8261 // "type": "string" 8262 // } 8263 // }, 8264 // "path": "v1alpha/{+parent}/conversionEvents", 8265 // "request": { 8266 // "$ref": "GoogleAnalyticsAdminV1alphaConversionEvent" 8267 // }, 8268 // "response": { 8269 // "$ref": "GoogleAnalyticsAdminV1alphaConversionEvent" 8270 // }, 8271 // "scopes": [ 8272 // "https://www.googleapis.com/auth/analytics.edit" 8273 // ] 8274 // } 8275 8276} 8277 8278// method id "analyticsadmin.properties.conversionEvents.delete": 8279 8280type PropertiesConversionEventsDeleteCall struct { 8281 s *Service 8282 name string 8283 urlParams_ gensupport.URLParams 8284 ctx_ context.Context 8285 header_ http.Header 8286} 8287 8288// Delete: Deletes a conversion event in a property. 8289// 8290// - name: The resource name of the conversion event to delete. Format: 8291// properties/{property}/conversionEvents/{conversion_event} Example: 8292// "properties/123/conversionEvents/456". 8293func (r *PropertiesConversionEventsService) Delete(name string) *PropertiesConversionEventsDeleteCall { 8294 c := &PropertiesConversionEventsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8295 c.name = name 8296 return c 8297} 8298 8299// Fields allows partial responses to be retrieved. See 8300// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8301// for more information. 8302func (c *PropertiesConversionEventsDeleteCall) Fields(s ...googleapi.Field) *PropertiesConversionEventsDeleteCall { 8303 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8304 return c 8305} 8306 8307// Context sets the context to be used in this call's Do method. Any 8308// pending HTTP request will be aborted if the provided context is 8309// canceled. 8310func (c *PropertiesConversionEventsDeleteCall) Context(ctx context.Context) *PropertiesConversionEventsDeleteCall { 8311 c.ctx_ = ctx 8312 return c 8313} 8314 8315// Header returns an http.Header that can be modified by the caller to 8316// add HTTP headers to the request. 8317func (c *PropertiesConversionEventsDeleteCall) Header() http.Header { 8318 if c.header_ == nil { 8319 c.header_ = make(http.Header) 8320 } 8321 return c.header_ 8322} 8323 8324func (c *PropertiesConversionEventsDeleteCall) doRequest(alt string) (*http.Response, error) { 8325 reqHeaders := make(http.Header) 8326 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8327 for k, v := range c.header_ { 8328 reqHeaders[k] = v 8329 } 8330 reqHeaders.Set("User-Agent", c.s.userAgent()) 8331 var body io.Reader = nil 8332 c.urlParams_.Set("alt", alt) 8333 c.urlParams_.Set("prettyPrint", "false") 8334 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 8335 urls += "?" + c.urlParams_.Encode() 8336 req, err := http.NewRequest("DELETE", urls, body) 8337 if err != nil { 8338 return nil, err 8339 } 8340 req.Header = reqHeaders 8341 googleapi.Expand(req.URL, map[string]string{ 8342 "name": c.name, 8343 }) 8344 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8345} 8346 8347// Do executes the "analyticsadmin.properties.conversionEvents.delete" call. 8348// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 8349// non-2xx status code is an error. Response headers are in either 8350// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 8351// returned at all) in error.(*googleapi.Error).Header. Use 8352// googleapi.IsNotModified to check whether the returned error was 8353// because http.StatusNotModified was returned. 8354func (c *PropertiesConversionEventsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 8355 gensupport.SetOptions(c.urlParams_, opts...) 8356 res, err := c.doRequest("json") 8357 if res != nil && res.StatusCode == http.StatusNotModified { 8358 if res.Body != nil { 8359 res.Body.Close() 8360 } 8361 return nil, &googleapi.Error{ 8362 Code: res.StatusCode, 8363 Header: res.Header, 8364 } 8365 } 8366 if err != nil { 8367 return nil, err 8368 } 8369 defer googleapi.CloseBody(res) 8370 if err := googleapi.CheckResponse(res); err != nil { 8371 return nil, err 8372 } 8373 ret := &GoogleProtobufEmpty{ 8374 ServerResponse: googleapi.ServerResponse{ 8375 Header: res.Header, 8376 HTTPStatusCode: res.StatusCode, 8377 }, 8378 } 8379 target := &ret 8380 if err := gensupport.DecodeResponse(target, res); err != nil { 8381 return nil, err 8382 } 8383 return ret, nil 8384 // { 8385 // "description": "Deletes a conversion event in a property.", 8386 // "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents/{conversionEventsId}", 8387 // "httpMethod": "DELETE", 8388 // "id": "analyticsadmin.properties.conversionEvents.delete", 8389 // "parameterOrder": [ 8390 // "name" 8391 // ], 8392 // "parameters": { 8393 // "name": { 8394 // "description": "Required. The resource name of the conversion event to delete. Format: properties/{property}/conversionEvents/{conversion_event} Example: \"properties/123/conversionEvents/456\"", 8395 // "location": "path", 8396 // "pattern": "^properties/[^/]+/conversionEvents/[^/]+$", 8397 // "required": true, 8398 // "type": "string" 8399 // } 8400 // }, 8401 // "path": "v1alpha/{+name}", 8402 // "response": { 8403 // "$ref": "GoogleProtobufEmpty" 8404 // }, 8405 // "scopes": [ 8406 // "https://www.googleapis.com/auth/analytics.edit" 8407 // ] 8408 // } 8409 8410} 8411 8412// method id "analyticsadmin.properties.conversionEvents.get": 8413 8414type PropertiesConversionEventsGetCall struct { 8415 s *Service 8416 name string 8417 urlParams_ gensupport.URLParams 8418 ifNoneMatch_ string 8419 ctx_ context.Context 8420 header_ http.Header 8421} 8422 8423// Get: Retrieve a single conversion event. 8424// 8425// - name: The resource name of the conversion event to retrieve. 8426// Format: properties/{property}/conversionEvents/{conversion_event} 8427// Example: "properties/123/conversionEvents/456". 8428func (r *PropertiesConversionEventsService) Get(name string) *PropertiesConversionEventsGetCall { 8429 c := &PropertiesConversionEventsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8430 c.name = name 8431 return c 8432} 8433 8434// Fields allows partial responses to be retrieved. See 8435// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8436// for more information. 8437func (c *PropertiesConversionEventsGetCall) Fields(s ...googleapi.Field) *PropertiesConversionEventsGetCall { 8438 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8439 return c 8440} 8441 8442// IfNoneMatch sets the optional parameter which makes the operation 8443// fail if the object's ETag matches the given value. This is useful for 8444// getting updates only after the object has changed since the last 8445// request. Use googleapi.IsNotModified to check whether the response 8446// error from Do is the result of In-None-Match. 8447func (c *PropertiesConversionEventsGetCall) IfNoneMatch(entityTag string) *PropertiesConversionEventsGetCall { 8448 c.ifNoneMatch_ = entityTag 8449 return c 8450} 8451 8452// Context sets the context to be used in this call's Do method. Any 8453// pending HTTP request will be aborted if the provided context is 8454// canceled. 8455func (c *PropertiesConversionEventsGetCall) Context(ctx context.Context) *PropertiesConversionEventsGetCall { 8456 c.ctx_ = ctx 8457 return c 8458} 8459 8460// Header returns an http.Header that can be modified by the caller to 8461// add HTTP headers to the request. 8462func (c *PropertiesConversionEventsGetCall) Header() http.Header { 8463 if c.header_ == nil { 8464 c.header_ = make(http.Header) 8465 } 8466 return c.header_ 8467} 8468 8469func (c *PropertiesConversionEventsGetCall) doRequest(alt string) (*http.Response, error) { 8470 reqHeaders := make(http.Header) 8471 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8472 for k, v := range c.header_ { 8473 reqHeaders[k] = v 8474 } 8475 reqHeaders.Set("User-Agent", c.s.userAgent()) 8476 if c.ifNoneMatch_ != "" { 8477 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8478 } 8479 var body io.Reader = nil 8480 c.urlParams_.Set("alt", alt) 8481 c.urlParams_.Set("prettyPrint", "false") 8482 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 8483 urls += "?" + c.urlParams_.Encode() 8484 req, err := http.NewRequest("GET", urls, body) 8485 if err != nil { 8486 return nil, err 8487 } 8488 req.Header = reqHeaders 8489 googleapi.Expand(req.URL, map[string]string{ 8490 "name": c.name, 8491 }) 8492 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8493} 8494 8495// Do executes the "analyticsadmin.properties.conversionEvents.get" call. 8496// Exactly one of *GoogleAnalyticsAdminV1alphaConversionEvent or error 8497// will be non-nil. Any non-2xx status code is an error. Response 8498// headers are in either 8499// *GoogleAnalyticsAdminV1alphaConversionEvent.ServerResponse.Header or 8500// (if a response was returned at all) in 8501// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8502// whether the returned error was because http.StatusNotModified was 8503// returned. 8504func (c *PropertiesConversionEventsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaConversionEvent, error) { 8505 gensupport.SetOptions(c.urlParams_, opts...) 8506 res, err := c.doRequest("json") 8507 if res != nil && res.StatusCode == http.StatusNotModified { 8508 if res.Body != nil { 8509 res.Body.Close() 8510 } 8511 return nil, &googleapi.Error{ 8512 Code: res.StatusCode, 8513 Header: res.Header, 8514 } 8515 } 8516 if err != nil { 8517 return nil, err 8518 } 8519 defer googleapi.CloseBody(res) 8520 if err := googleapi.CheckResponse(res); err != nil { 8521 return nil, err 8522 } 8523 ret := &GoogleAnalyticsAdminV1alphaConversionEvent{ 8524 ServerResponse: googleapi.ServerResponse{ 8525 Header: res.Header, 8526 HTTPStatusCode: res.StatusCode, 8527 }, 8528 } 8529 target := &ret 8530 if err := gensupport.DecodeResponse(target, res); err != nil { 8531 return nil, err 8532 } 8533 return ret, nil 8534 // { 8535 // "description": "Retrieve a single conversion event.", 8536 // "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents/{conversionEventsId}", 8537 // "httpMethod": "GET", 8538 // "id": "analyticsadmin.properties.conversionEvents.get", 8539 // "parameterOrder": [ 8540 // "name" 8541 // ], 8542 // "parameters": { 8543 // "name": { 8544 // "description": "Required. The resource name of the conversion event to retrieve. Format: properties/{property}/conversionEvents/{conversion_event} Example: \"properties/123/conversionEvents/456\"", 8545 // "location": "path", 8546 // "pattern": "^properties/[^/]+/conversionEvents/[^/]+$", 8547 // "required": true, 8548 // "type": "string" 8549 // } 8550 // }, 8551 // "path": "v1alpha/{+name}", 8552 // "response": { 8553 // "$ref": "GoogleAnalyticsAdminV1alphaConversionEvent" 8554 // }, 8555 // "scopes": [ 8556 // "https://www.googleapis.com/auth/analytics.edit", 8557 // "https://www.googleapis.com/auth/analytics.readonly" 8558 // ] 8559 // } 8560 8561} 8562 8563// method id "analyticsadmin.properties.conversionEvents.list": 8564 8565type PropertiesConversionEventsListCall struct { 8566 s *Service 8567 parent string 8568 urlParams_ gensupport.URLParams 8569 ifNoneMatch_ string 8570 ctx_ context.Context 8571 header_ http.Header 8572} 8573 8574// List: Returns a list of conversion events in the specified parent 8575// property. Returns an empty list if no conversion events are found. 8576// 8577// - parent: The resource name of the parent property. Example: 8578// 'properties/123'. 8579func (r *PropertiesConversionEventsService) List(parent string) *PropertiesConversionEventsListCall { 8580 c := &PropertiesConversionEventsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8581 c.parent = parent 8582 return c 8583} 8584 8585// PageSize sets the optional parameter "pageSize": The maximum number 8586// of resources to return. If unspecified, at most 50 resources will be 8587// returned. The maximum value is 200; (higher values will be coerced to 8588// the maximum) 8589func (c *PropertiesConversionEventsListCall) PageSize(pageSize int64) *PropertiesConversionEventsListCall { 8590 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 8591 return c 8592} 8593 8594// PageToken sets the optional parameter "pageToken": A page token, 8595// received from a previous `ListConversionEvents` call. Provide this to 8596// retrieve the subsequent page. When paginating, all other parameters 8597// provided to `ListConversionEvents` must match the call that provided 8598// the page token. 8599func (c *PropertiesConversionEventsListCall) PageToken(pageToken string) *PropertiesConversionEventsListCall { 8600 c.urlParams_.Set("pageToken", pageToken) 8601 return c 8602} 8603 8604// Fields allows partial responses to be retrieved. See 8605// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8606// for more information. 8607func (c *PropertiesConversionEventsListCall) Fields(s ...googleapi.Field) *PropertiesConversionEventsListCall { 8608 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8609 return c 8610} 8611 8612// IfNoneMatch sets the optional parameter which makes the operation 8613// fail if the object's ETag matches the given value. This is useful for 8614// getting updates only after the object has changed since the last 8615// request. Use googleapi.IsNotModified to check whether the response 8616// error from Do is the result of In-None-Match. 8617func (c *PropertiesConversionEventsListCall) IfNoneMatch(entityTag string) *PropertiesConversionEventsListCall { 8618 c.ifNoneMatch_ = entityTag 8619 return c 8620} 8621 8622// Context sets the context to be used in this call's Do method. Any 8623// pending HTTP request will be aborted if the provided context is 8624// canceled. 8625func (c *PropertiesConversionEventsListCall) Context(ctx context.Context) *PropertiesConversionEventsListCall { 8626 c.ctx_ = ctx 8627 return c 8628} 8629 8630// Header returns an http.Header that can be modified by the caller to 8631// add HTTP headers to the request. 8632func (c *PropertiesConversionEventsListCall) Header() http.Header { 8633 if c.header_ == nil { 8634 c.header_ = make(http.Header) 8635 } 8636 return c.header_ 8637} 8638 8639func (c *PropertiesConversionEventsListCall) doRequest(alt string) (*http.Response, error) { 8640 reqHeaders := make(http.Header) 8641 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8642 for k, v := range c.header_ { 8643 reqHeaders[k] = v 8644 } 8645 reqHeaders.Set("User-Agent", c.s.userAgent()) 8646 if c.ifNoneMatch_ != "" { 8647 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8648 } 8649 var body io.Reader = nil 8650 c.urlParams_.Set("alt", alt) 8651 c.urlParams_.Set("prettyPrint", "false") 8652 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversionEvents") 8653 urls += "?" + c.urlParams_.Encode() 8654 req, err := http.NewRequest("GET", urls, body) 8655 if err != nil { 8656 return nil, err 8657 } 8658 req.Header = reqHeaders 8659 googleapi.Expand(req.URL, map[string]string{ 8660 "parent": c.parent, 8661 }) 8662 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8663} 8664 8665// Do executes the "analyticsadmin.properties.conversionEvents.list" call. 8666// Exactly one of 8667// *GoogleAnalyticsAdminV1alphaListConversionEventsResponse or error 8668// will be non-nil. Any non-2xx status code is an error. Response 8669// headers are in either 8670// *GoogleAnalyticsAdminV1alphaListConversionEventsResponse.ServerRespons 8671// e.Header or (if a response was returned at all) in 8672// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8673// whether the returned error was because http.StatusNotModified was 8674// returned. 8675func (c *PropertiesConversionEventsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListConversionEventsResponse, error) { 8676 gensupport.SetOptions(c.urlParams_, opts...) 8677 res, err := c.doRequest("json") 8678 if res != nil && res.StatusCode == http.StatusNotModified { 8679 if res.Body != nil { 8680 res.Body.Close() 8681 } 8682 return nil, &googleapi.Error{ 8683 Code: res.StatusCode, 8684 Header: res.Header, 8685 } 8686 } 8687 if err != nil { 8688 return nil, err 8689 } 8690 defer googleapi.CloseBody(res) 8691 if err := googleapi.CheckResponse(res); err != nil { 8692 return nil, err 8693 } 8694 ret := &GoogleAnalyticsAdminV1alphaListConversionEventsResponse{ 8695 ServerResponse: googleapi.ServerResponse{ 8696 Header: res.Header, 8697 HTTPStatusCode: res.StatusCode, 8698 }, 8699 } 8700 target := &ret 8701 if err := gensupport.DecodeResponse(target, res); err != nil { 8702 return nil, err 8703 } 8704 return ret, nil 8705 // { 8706 // "description": "Returns a list of conversion events in the specified parent property. Returns an empty list if no conversion events are found.", 8707 // "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents", 8708 // "httpMethod": "GET", 8709 // "id": "analyticsadmin.properties.conversionEvents.list", 8710 // "parameterOrder": [ 8711 // "parent" 8712 // ], 8713 // "parameters": { 8714 // "pageSize": { 8715 // "description": "The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)", 8716 // "format": "int32", 8717 // "location": "query", 8718 // "type": "integer" 8719 // }, 8720 // "pageToken": { 8721 // "description": "A page token, received from a previous `ListConversionEvents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListConversionEvents` must match the call that provided the page token.", 8722 // "location": "query", 8723 // "type": "string" 8724 // }, 8725 // "parent": { 8726 // "description": "Required. The resource name of the parent property. Example: 'properties/123'", 8727 // "location": "path", 8728 // "pattern": "^properties/[^/]+$", 8729 // "required": true, 8730 // "type": "string" 8731 // } 8732 // }, 8733 // "path": "v1alpha/{+parent}/conversionEvents", 8734 // "response": { 8735 // "$ref": "GoogleAnalyticsAdminV1alphaListConversionEventsResponse" 8736 // }, 8737 // "scopes": [ 8738 // "https://www.googleapis.com/auth/analytics.edit", 8739 // "https://www.googleapis.com/auth/analytics.readonly" 8740 // ] 8741 // } 8742 8743} 8744 8745// Pages invokes f for each page of results. 8746// A non-nil error returned from f will halt the iteration. 8747// The provided context supersedes any context provided to the Context method. 8748func (c *PropertiesConversionEventsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListConversionEventsResponse) error) error { 8749 c.ctx_ = ctx 8750 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 8751 for { 8752 x, err := c.Do() 8753 if err != nil { 8754 return err 8755 } 8756 if err := f(x); err != nil { 8757 return err 8758 } 8759 if x.NextPageToken == "" { 8760 return nil 8761 } 8762 c.PageToken(x.NextPageToken) 8763 } 8764} 8765 8766// method id "analyticsadmin.properties.customDimensions.archive": 8767 8768type PropertiesCustomDimensionsArchiveCall struct { 8769 s *Service 8770 name string 8771 googleanalyticsadminv1alphaarchivecustomdimensionrequest *GoogleAnalyticsAdminV1alphaArchiveCustomDimensionRequest 8772 urlParams_ gensupport.URLParams 8773 ctx_ context.Context 8774 header_ http.Header 8775} 8776 8777// Archive: Archives a CustomDimension on a property. 8778// 8779// - name: The name of the CustomDimension to archive. Example format: 8780// properties/1234/customDimensions/5678. 8781func (r *PropertiesCustomDimensionsService) Archive(name string, googleanalyticsadminv1alphaarchivecustomdimensionrequest *GoogleAnalyticsAdminV1alphaArchiveCustomDimensionRequest) *PropertiesCustomDimensionsArchiveCall { 8782 c := &PropertiesCustomDimensionsArchiveCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8783 c.name = name 8784 c.googleanalyticsadminv1alphaarchivecustomdimensionrequest = googleanalyticsadminv1alphaarchivecustomdimensionrequest 8785 return c 8786} 8787 8788// Fields allows partial responses to be retrieved. See 8789// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8790// for more information. 8791func (c *PropertiesCustomDimensionsArchiveCall) Fields(s ...googleapi.Field) *PropertiesCustomDimensionsArchiveCall { 8792 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8793 return c 8794} 8795 8796// Context sets the context to be used in this call's Do method. Any 8797// pending HTTP request will be aborted if the provided context is 8798// canceled. 8799func (c *PropertiesCustomDimensionsArchiveCall) Context(ctx context.Context) *PropertiesCustomDimensionsArchiveCall { 8800 c.ctx_ = ctx 8801 return c 8802} 8803 8804// Header returns an http.Header that can be modified by the caller to 8805// add HTTP headers to the request. 8806func (c *PropertiesCustomDimensionsArchiveCall) Header() http.Header { 8807 if c.header_ == nil { 8808 c.header_ = make(http.Header) 8809 } 8810 return c.header_ 8811} 8812 8813func (c *PropertiesCustomDimensionsArchiveCall) doRequest(alt string) (*http.Response, error) { 8814 reqHeaders := make(http.Header) 8815 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8816 for k, v := range c.header_ { 8817 reqHeaders[k] = v 8818 } 8819 reqHeaders.Set("User-Agent", c.s.userAgent()) 8820 var body io.Reader = nil 8821 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaarchivecustomdimensionrequest) 8822 if err != nil { 8823 return nil, err 8824 } 8825 reqHeaders.Set("Content-Type", "application/json") 8826 c.urlParams_.Set("alt", alt) 8827 c.urlParams_.Set("prettyPrint", "false") 8828 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:archive") 8829 urls += "?" + c.urlParams_.Encode() 8830 req, err := http.NewRequest("POST", urls, body) 8831 if err != nil { 8832 return nil, err 8833 } 8834 req.Header = reqHeaders 8835 googleapi.Expand(req.URL, map[string]string{ 8836 "name": c.name, 8837 }) 8838 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8839} 8840 8841// Do executes the "analyticsadmin.properties.customDimensions.archive" call. 8842// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 8843// non-2xx status code is an error. Response headers are in either 8844// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 8845// returned at all) in error.(*googleapi.Error).Header. Use 8846// googleapi.IsNotModified to check whether the returned error was 8847// because http.StatusNotModified was returned. 8848func (c *PropertiesCustomDimensionsArchiveCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 8849 gensupport.SetOptions(c.urlParams_, opts...) 8850 res, err := c.doRequest("json") 8851 if res != nil && res.StatusCode == http.StatusNotModified { 8852 if res.Body != nil { 8853 res.Body.Close() 8854 } 8855 return nil, &googleapi.Error{ 8856 Code: res.StatusCode, 8857 Header: res.Header, 8858 } 8859 } 8860 if err != nil { 8861 return nil, err 8862 } 8863 defer googleapi.CloseBody(res) 8864 if err := googleapi.CheckResponse(res); err != nil { 8865 return nil, err 8866 } 8867 ret := &GoogleProtobufEmpty{ 8868 ServerResponse: googleapi.ServerResponse{ 8869 Header: res.Header, 8870 HTTPStatusCode: res.StatusCode, 8871 }, 8872 } 8873 target := &ret 8874 if err := gensupport.DecodeResponse(target, res); err != nil { 8875 return nil, err 8876 } 8877 return ret, nil 8878 // { 8879 // "description": "Archives a CustomDimension on a property.", 8880 // "flatPath": "v1alpha/properties/{propertiesId}/customDimensions/{customDimensionsId}:archive", 8881 // "httpMethod": "POST", 8882 // "id": "analyticsadmin.properties.customDimensions.archive", 8883 // "parameterOrder": [ 8884 // "name" 8885 // ], 8886 // "parameters": { 8887 // "name": { 8888 // "description": "Required. The name of the CustomDimension to archive. Example format: properties/1234/customDimensions/5678", 8889 // "location": "path", 8890 // "pattern": "^properties/[^/]+/customDimensions/[^/]+$", 8891 // "required": true, 8892 // "type": "string" 8893 // } 8894 // }, 8895 // "path": "v1alpha/{+name}:archive", 8896 // "request": { 8897 // "$ref": "GoogleAnalyticsAdminV1alphaArchiveCustomDimensionRequest" 8898 // }, 8899 // "response": { 8900 // "$ref": "GoogleProtobufEmpty" 8901 // }, 8902 // "scopes": [ 8903 // "https://www.googleapis.com/auth/analytics.edit" 8904 // ] 8905 // } 8906 8907} 8908 8909// method id "analyticsadmin.properties.customDimensions.create": 8910 8911type PropertiesCustomDimensionsCreateCall struct { 8912 s *Service 8913 parent string 8914 googleanalyticsadminv1alphacustomdimension *GoogleAnalyticsAdminV1alphaCustomDimension 8915 urlParams_ gensupport.URLParams 8916 ctx_ context.Context 8917 header_ http.Header 8918} 8919 8920// Create: Creates a CustomDimension. 8921// 8922// - parent: Example format: properties/1234. 8923func (r *PropertiesCustomDimensionsService) Create(parent string, googleanalyticsadminv1alphacustomdimension *GoogleAnalyticsAdminV1alphaCustomDimension) *PropertiesCustomDimensionsCreateCall { 8924 c := &PropertiesCustomDimensionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8925 c.parent = parent 8926 c.googleanalyticsadminv1alphacustomdimension = googleanalyticsadminv1alphacustomdimension 8927 return c 8928} 8929 8930// Fields allows partial responses to be retrieved. See 8931// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8932// for more information. 8933func (c *PropertiesCustomDimensionsCreateCall) Fields(s ...googleapi.Field) *PropertiesCustomDimensionsCreateCall { 8934 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8935 return c 8936} 8937 8938// Context sets the context to be used in this call's Do method. Any 8939// pending HTTP request will be aborted if the provided context is 8940// canceled. 8941func (c *PropertiesCustomDimensionsCreateCall) Context(ctx context.Context) *PropertiesCustomDimensionsCreateCall { 8942 c.ctx_ = ctx 8943 return c 8944} 8945 8946// Header returns an http.Header that can be modified by the caller to 8947// add HTTP headers to the request. 8948func (c *PropertiesCustomDimensionsCreateCall) Header() http.Header { 8949 if c.header_ == nil { 8950 c.header_ = make(http.Header) 8951 } 8952 return c.header_ 8953} 8954 8955func (c *PropertiesCustomDimensionsCreateCall) doRequest(alt string) (*http.Response, error) { 8956 reqHeaders := make(http.Header) 8957 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 8958 for k, v := range c.header_ { 8959 reqHeaders[k] = v 8960 } 8961 reqHeaders.Set("User-Agent", c.s.userAgent()) 8962 var body io.Reader = nil 8963 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphacustomdimension) 8964 if err != nil { 8965 return nil, err 8966 } 8967 reqHeaders.Set("Content-Type", "application/json") 8968 c.urlParams_.Set("alt", alt) 8969 c.urlParams_.Set("prettyPrint", "false") 8970 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/customDimensions") 8971 urls += "?" + c.urlParams_.Encode() 8972 req, err := http.NewRequest("POST", urls, body) 8973 if err != nil { 8974 return nil, err 8975 } 8976 req.Header = reqHeaders 8977 googleapi.Expand(req.URL, map[string]string{ 8978 "parent": c.parent, 8979 }) 8980 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8981} 8982 8983// Do executes the "analyticsadmin.properties.customDimensions.create" call. 8984// Exactly one of *GoogleAnalyticsAdminV1alphaCustomDimension or error 8985// will be non-nil. Any non-2xx status code is an error. Response 8986// headers are in either 8987// *GoogleAnalyticsAdminV1alphaCustomDimension.ServerResponse.Header or 8988// (if a response was returned at all) in 8989// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8990// whether the returned error was because http.StatusNotModified was 8991// returned. 8992func (c *PropertiesCustomDimensionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCustomDimension, error) { 8993 gensupport.SetOptions(c.urlParams_, opts...) 8994 res, err := c.doRequest("json") 8995 if res != nil && res.StatusCode == http.StatusNotModified { 8996 if res.Body != nil { 8997 res.Body.Close() 8998 } 8999 return nil, &googleapi.Error{ 9000 Code: res.StatusCode, 9001 Header: res.Header, 9002 } 9003 } 9004 if err != nil { 9005 return nil, err 9006 } 9007 defer googleapi.CloseBody(res) 9008 if err := googleapi.CheckResponse(res); err != nil { 9009 return nil, err 9010 } 9011 ret := &GoogleAnalyticsAdminV1alphaCustomDimension{ 9012 ServerResponse: googleapi.ServerResponse{ 9013 Header: res.Header, 9014 HTTPStatusCode: res.StatusCode, 9015 }, 9016 } 9017 target := &ret 9018 if err := gensupport.DecodeResponse(target, res); err != nil { 9019 return nil, err 9020 } 9021 return ret, nil 9022 // { 9023 // "description": "Creates a CustomDimension.", 9024 // "flatPath": "v1alpha/properties/{propertiesId}/customDimensions", 9025 // "httpMethod": "POST", 9026 // "id": "analyticsadmin.properties.customDimensions.create", 9027 // "parameterOrder": [ 9028 // "parent" 9029 // ], 9030 // "parameters": { 9031 // "parent": { 9032 // "description": "Required. Example format: properties/1234", 9033 // "location": "path", 9034 // "pattern": "^properties/[^/]+$", 9035 // "required": true, 9036 // "type": "string" 9037 // } 9038 // }, 9039 // "path": "v1alpha/{+parent}/customDimensions", 9040 // "request": { 9041 // "$ref": "GoogleAnalyticsAdminV1alphaCustomDimension" 9042 // }, 9043 // "response": { 9044 // "$ref": "GoogleAnalyticsAdminV1alphaCustomDimension" 9045 // }, 9046 // "scopes": [ 9047 // "https://www.googleapis.com/auth/analytics.edit" 9048 // ] 9049 // } 9050 9051} 9052 9053// method id "analyticsadmin.properties.customDimensions.get": 9054 9055type PropertiesCustomDimensionsGetCall struct { 9056 s *Service 9057 name string 9058 urlParams_ gensupport.URLParams 9059 ifNoneMatch_ string 9060 ctx_ context.Context 9061 header_ http.Header 9062} 9063 9064// Get: Lookup for a single CustomDimension. 9065// 9066// - name: The name of the CustomDimension to get. Example format: 9067// properties/1234/customDimensions/5678. 9068func (r *PropertiesCustomDimensionsService) Get(name string) *PropertiesCustomDimensionsGetCall { 9069 c := &PropertiesCustomDimensionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9070 c.name = name 9071 return c 9072} 9073 9074// Fields allows partial responses to be retrieved. See 9075// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9076// for more information. 9077func (c *PropertiesCustomDimensionsGetCall) Fields(s ...googleapi.Field) *PropertiesCustomDimensionsGetCall { 9078 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9079 return c 9080} 9081 9082// IfNoneMatch sets the optional parameter which makes the operation 9083// fail if the object's ETag matches the given value. This is useful for 9084// getting updates only after the object has changed since the last 9085// request. Use googleapi.IsNotModified to check whether the response 9086// error from Do is the result of In-None-Match. 9087func (c *PropertiesCustomDimensionsGetCall) IfNoneMatch(entityTag string) *PropertiesCustomDimensionsGetCall { 9088 c.ifNoneMatch_ = entityTag 9089 return c 9090} 9091 9092// Context sets the context to be used in this call's Do method. Any 9093// pending HTTP request will be aborted if the provided context is 9094// canceled. 9095func (c *PropertiesCustomDimensionsGetCall) Context(ctx context.Context) *PropertiesCustomDimensionsGetCall { 9096 c.ctx_ = ctx 9097 return c 9098} 9099 9100// Header returns an http.Header that can be modified by the caller to 9101// add HTTP headers to the request. 9102func (c *PropertiesCustomDimensionsGetCall) Header() http.Header { 9103 if c.header_ == nil { 9104 c.header_ = make(http.Header) 9105 } 9106 return c.header_ 9107} 9108 9109func (c *PropertiesCustomDimensionsGetCall) doRequest(alt string) (*http.Response, error) { 9110 reqHeaders := make(http.Header) 9111 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9112 for k, v := range c.header_ { 9113 reqHeaders[k] = v 9114 } 9115 reqHeaders.Set("User-Agent", c.s.userAgent()) 9116 if c.ifNoneMatch_ != "" { 9117 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9118 } 9119 var body io.Reader = nil 9120 c.urlParams_.Set("alt", alt) 9121 c.urlParams_.Set("prettyPrint", "false") 9122 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 9123 urls += "?" + c.urlParams_.Encode() 9124 req, err := http.NewRequest("GET", urls, body) 9125 if err != nil { 9126 return nil, err 9127 } 9128 req.Header = reqHeaders 9129 googleapi.Expand(req.URL, map[string]string{ 9130 "name": c.name, 9131 }) 9132 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9133} 9134 9135// Do executes the "analyticsadmin.properties.customDimensions.get" call. 9136// Exactly one of *GoogleAnalyticsAdminV1alphaCustomDimension or error 9137// will be non-nil. Any non-2xx status code is an error. Response 9138// headers are in either 9139// *GoogleAnalyticsAdminV1alphaCustomDimension.ServerResponse.Header or 9140// (if a response was returned at all) in 9141// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9142// whether the returned error was because http.StatusNotModified was 9143// returned. 9144func (c *PropertiesCustomDimensionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCustomDimension, error) { 9145 gensupport.SetOptions(c.urlParams_, opts...) 9146 res, err := c.doRequest("json") 9147 if res != nil && res.StatusCode == http.StatusNotModified { 9148 if res.Body != nil { 9149 res.Body.Close() 9150 } 9151 return nil, &googleapi.Error{ 9152 Code: res.StatusCode, 9153 Header: res.Header, 9154 } 9155 } 9156 if err != nil { 9157 return nil, err 9158 } 9159 defer googleapi.CloseBody(res) 9160 if err := googleapi.CheckResponse(res); err != nil { 9161 return nil, err 9162 } 9163 ret := &GoogleAnalyticsAdminV1alphaCustomDimension{ 9164 ServerResponse: googleapi.ServerResponse{ 9165 Header: res.Header, 9166 HTTPStatusCode: res.StatusCode, 9167 }, 9168 } 9169 target := &ret 9170 if err := gensupport.DecodeResponse(target, res); err != nil { 9171 return nil, err 9172 } 9173 return ret, nil 9174 // { 9175 // "description": "Lookup for a single CustomDimension.", 9176 // "flatPath": "v1alpha/properties/{propertiesId}/customDimensions/{customDimensionsId}", 9177 // "httpMethod": "GET", 9178 // "id": "analyticsadmin.properties.customDimensions.get", 9179 // "parameterOrder": [ 9180 // "name" 9181 // ], 9182 // "parameters": { 9183 // "name": { 9184 // "description": "Required. The name of the CustomDimension to get. Example format: properties/1234/customDimensions/5678", 9185 // "location": "path", 9186 // "pattern": "^properties/[^/]+/customDimensions/[^/]+$", 9187 // "required": true, 9188 // "type": "string" 9189 // } 9190 // }, 9191 // "path": "v1alpha/{+name}", 9192 // "response": { 9193 // "$ref": "GoogleAnalyticsAdminV1alphaCustomDimension" 9194 // }, 9195 // "scopes": [ 9196 // "https://www.googleapis.com/auth/analytics.edit", 9197 // "https://www.googleapis.com/auth/analytics.readonly" 9198 // ] 9199 // } 9200 9201} 9202 9203// method id "analyticsadmin.properties.customDimensions.list": 9204 9205type PropertiesCustomDimensionsListCall struct { 9206 s *Service 9207 parent string 9208 urlParams_ gensupport.URLParams 9209 ifNoneMatch_ string 9210 ctx_ context.Context 9211 header_ http.Header 9212} 9213 9214// List: Lists CustomDimensions on a property. 9215// 9216// - parent: Example format: properties/1234. 9217func (r *PropertiesCustomDimensionsService) List(parent string) *PropertiesCustomDimensionsListCall { 9218 c := &PropertiesCustomDimensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9219 c.parent = parent 9220 return c 9221} 9222 9223// PageSize sets the optional parameter "pageSize": The maximum number 9224// of resources to return. If unspecified, at most 50 resources will be 9225// returned. The maximum value is 200 (higher values will be coerced to 9226// the maximum). 9227func (c *PropertiesCustomDimensionsListCall) PageSize(pageSize int64) *PropertiesCustomDimensionsListCall { 9228 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9229 return c 9230} 9231 9232// PageToken sets the optional parameter "pageToken": A page token, 9233// received from a previous `ListCustomDimensions` call. Provide this to 9234// retrieve the subsequent page. When paginating, all other parameters 9235// provided to `ListCustomDimensions` must match the call that provided 9236// the page token. 9237func (c *PropertiesCustomDimensionsListCall) PageToken(pageToken string) *PropertiesCustomDimensionsListCall { 9238 c.urlParams_.Set("pageToken", pageToken) 9239 return c 9240} 9241 9242// Fields allows partial responses to be retrieved. See 9243// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9244// for more information. 9245func (c *PropertiesCustomDimensionsListCall) Fields(s ...googleapi.Field) *PropertiesCustomDimensionsListCall { 9246 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9247 return c 9248} 9249 9250// IfNoneMatch sets the optional parameter which makes the operation 9251// fail if the object's ETag matches the given value. This is useful for 9252// getting updates only after the object has changed since the last 9253// request. Use googleapi.IsNotModified to check whether the response 9254// error from Do is the result of In-None-Match. 9255func (c *PropertiesCustomDimensionsListCall) IfNoneMatch(entityTag string) *PropertiesCustomDimensionsListCall { 9256 c.ifNoneMatch_ = entityTag 9257 return c 9258} 9259 9260// Context sets the context to be used in this call's Do method. Any 9261// pending HTTP request will be aborted if the provided context is 9262// canceled. 9263func (c *PropertiesCustomDimensionsListCall) Context(ctx context.Context) *PropertiesCustomDimensionsListCall { 9264 c.ctx_ = ctx 9265 return c 9266} 9267 9268// Header returns an http.Header that can be modified by the caller to 9269// add HTTP headers to the request. 9270func (c *PropertiesCustomDimensionsListCall) Header() http.Header { 9271 if c.header_ == nil { 9272 c.header_ = make(http.Header) 9273 } 9274 return c.header_ 9275} 9276 9277func (c *PropertiesCustomDimensionsListCall) doRequest(alt string) (*http.Response, error) { 9278 reqHeaders := make(http.Header) 9279 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9280 for k, v := range c.header_ { 9281 reqHeaders[k] = v 9282 } 9283 reqHeaders.Set("User-Agent", c.s.userAgent()) 9284 if c.ifNoneMatch_ != "" { 9285 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9286 } 9287 var body io.Reader = nil 9288 c.urlParams_.Set("alt", alt) 9289 c.urlParams_.Set("prettyPrint", "false") 9290 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/customDimensions") 9291 urls += "?" + c.urlParams_.Encode() 9292 req, err := http.NewRequest("GET", urls, body) 9293 if err != nil { 9294 return nil, err 9295 } 9296 req.Header = reqHeaders 9297 googleapi.Expand(req.URL, map[string]string{ 9298 "parent": c.parent, 9299 }) 9300 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9301} 9302 9303// Do executes the "analyticsadmin.properties.customDimensions.list" call. 9304// Exactly one of 9305// *GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse or error 9306// will be non-nil. Any non-2xx status code is an error. Response 9307// headers are in either 9308// *GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse.ServerRespons 9309// e.Header or (if a response was returned at all) in 9310// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9311// whether the returned error was because http.StatusNotModified was 9312// returned. 9313func (c *PropertiesCustomDimensionsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse, error) { 9314 gensupport.SetOptions(c.urlParams_, opts...) 9315 res, err := c.doRequest("json") 9316 if res != nil && res.StatusCode == http.StatusNotModified { 9317 if res.Body != nil { 9318 res.Body.Close() 9319 } 9320 return nil, &googleapi.Error{ 9321 Code: res.StatusCode, 9322 Header: res.Header, 9323 } 9324 } 9325 if err != nil { 9326 return nil, err 9327 } 9328 defer googleapi.CloseBody(res) 9329 if err := googleapi.CheckResponse(res); err != nil { 9330 return nil, err 9331 } 9332 ret := &GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse{ 9333 ServerResponse: googleapi.ServerResponse{ 9334 Header: res.Header, 9335 HTTPStatusCode: res.StatusCode, 9336 }, 9337 } 9338 target := &ret 9339 if err := gensupport.DecodeResponse(target, res); err != nil { 9340 return nil, err 9341 } 9342 return ret, nil 9343 // { 9344 // "description": "Lists CustomDimensions on a property.", 9345 // "flatPath": "v1alpha/properties/{propertiesId}/customDimensions", 9346 // "httpMethod": "GET", 9347 // "id": "analyticsadmin.properties.customDimensions.list", 9348 // "parameterOrder": [ 9349 // "parent" 9350 // ], 9351 // "parameters": { 9352 // "pageSize": { 9353 // "description": "The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).", 9354 // "format": "int32", 9355 // "location": "query", 9356 // "type": "integer" 9357 // }, 9358 // "pageToken": { 9359 // "description": "A page token, received from a previous `ListCustomDimensions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCustomDimensions` must match the call that provided the page token.", 9360 // "location": "query", 9361 // "type": "string" 9362 // }, 9363 // "parent": { 9364 // "description": "Required. Example format: properties/1234", 9365 // "location": "path", 9366 // "pattern": "^properties/[^/]+$", 9367 // "required": true, 9368 // "type": "string" 9369 // } 9370 // }, 9371 // "path": "v1alpha/{+parent}/customDimensions", 9372 // "response": { 9373 // "$ref": "GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse" 9374 // }, 9375 // "scopes": [ 9376 // "https://www.googleapis.com/auth/analytics.edit", 9377 // "https://www.googleapis.com/auth/analytics.readonly" 9378 // ] 9379 // } 9380 9381} 9382 9383// Pages invokes f for each page of results. 9384// A non-nil error returned from f will halt the iteration. 9385// The provided context supersedes any context provided to the Context method. 9386func (c *PropertiesCustomDimensionsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListCustomDimensionsResponse) error) error { 9387 c.ctx_ = ctx 9388 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 9389 for { 9390 x, err := c.Do() 9391 if err != nil { 9392 return err 9393 } 9394 if err := f(x); err != nil { 9395 return err 9396 } 9397 if x.NextPageToken == "" { 9398 return nil 9399 } 9400 c.PageToken(x.NextPageToken) 9401 } 9402} 9403 9404// method id "analyticsadmin.properties.customDimensions.patch": 9405 9406type PropertiesCustomDimensionsPatchCall struct { 9407 s *Service 9408 name string 9409 googleanalyticsadminv1alphacustomdimension *GoogleAnalyticsAdminV1alphaCustomDimension 9410 urlParams_ gensupport.URLParams 9411 ctx_ context.Context 9412 header_ http.Header 9413} 9414 9415// Patch: Updates a CustomDimension on a property. 9416// 9417// - name: Output only. Resource name for this CustomDimension resource. 9418// Format: properties/{property}/customDimensions/{customDimension}. 9419func (r *PropertiesCustomDimensionsService) Patch(name string, googleanalyticsadminv1alphacustomdimension *GoogleAnalyticsAdminV1alphaCustomDimension) *PropertiesCustomDimensionsPatchCall { 9420 c := &PropertiesCustomDimensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9421 c.name = name 9422 c.googleanalyticsadminv1alphacustomdimension = googleanalyticsadminv1alphacustomdimension 9423 return c 9424} 9425 9426// UpdateMask sets the optional parameter "updateMask": Required. The 9427// list of fields to be updated. Omitted fields will not be updated. To 9428// replace the entire entity, use one path with the string "*" to match 9429// all fields. 9430func (c *PropertiesCustomDimensionsPatchCall) UpdateMask(updateMask string) *PropertiesCustomDimensionsPatchCall { 9431 c.urlParams_.Set("updateMask", updateMask) 9432 return c 9433} 9434 9435// Fields allows partial responses to be retrieved. See 9436// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9437// for more information. 9438func (c *PropertiesCustomDimensionsPatchCall) Fields(s ...googleapi.Field) *PropertiesCustomDimensionsPatchCall { 9439 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9440 return c 9441} 9442 9443// Context sets the context to be used in this call's Do method. Any 9444// pending HTTP request will be aborted if the provided context is 9445// canceled. 9446func (c *PropertiesCustomDimensionsPatchCall) Context(ctx context.Context) *PropertiesCustomDimensionsPatchCall { 9447 c.ctx_ = ctx 9448 return c 9449} 9450 9451// Header returns an http.Header that can be modified by the caller to 9452// add HTTP headers to the request. 9453func (c *PropertiesCustomDimensionsPatchCall) Header() http.Header { 9454 if c.header_ == nil { 9455 c.header_ = make(http.Header) 9456 } 9457 return c.header_ 9458} 9459 9460func (c *PropertiesCustomDimensionsPatchCall) doRequest(alt string) (*http.Response, error) { 9461 reqHeaders := make(http.Header) 9462 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9463 for k, v := range c.header_ { 9464 reqHeaders[k] = v 9465 } 9466 reqHeaders.Set("User-Agent", c.s.userAgent()) 9467 var body io.Reader = nil 9468 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphacustomdimension) 9469 if err != nil { 9470 return nil, err 9471 } 9472 reqHeaders.Set("Content-Type", "application/json") 9473 c.urlParams_.Set("alt", alt) 9474 c.urlParams_.Set("prettyPrint", "false") 9475 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 9476 urls += "?" + c.urlParams_.Encode() 9477 req, err := http.NewRequest("PATCH", urls, body) 9478 if err != nil { 9479 return nil, err 9480 } 9481 req.Header = reqHeaders 9482 googleapi.Expand(req.URL, map[string]string{ 9483 "name": c.name, 9484 }) 9485 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9486} 9487 9488// Do executes the "analyticsadmin.properties.customDimensions.patch" call. 9489// Exactly one of *GoogleAnalyticsAdminV1alphaCustomDimension or error 9490// will be non-nil. Any non-2xx status code is an error. Response 9491// headers are in either 9492// *GoogleAnalyticsAdminV1alphaCustomDimension.ServerResponse.Header or 9493// (if a response was returned at all) in 9494// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9495// whether the returned error was because http.StatusNotModified was 9496// returned. 9497func (c *PropertiesCustomDimensionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCustomDimension, error) { 9498 gensupport.SetOptions(c.urlParams_, opts...) 9499 res, err := c.doRequest("json") 9500 if res != nil && res.StatusCode == http.StatusNotModified { 9501 if res.Body != nil { 9502 res.Body.Close() 9503 } 9504 return nil, &googleapi.Error{ 9505 Code: res.StatusCode, 9506 Header: res.Header, 9507 } 9508 } 9509 if err != nil { 9510 return nil, err 9511 } 9512 defer googleapi.CloseBody(res) 9513 if err := googleapi.CheckResponse(res); err != nil { 9514 return nil, err 9515 } 9516 ret := &GoogleAnalyticsAdminV1alphaCustomDimension{ 9517 ServerResponse: googleapi.ServerResponse{ 9518 Header: res.Header, 9519 HTTPStatusCode: res.StatusCode, 9520 }, 9521 } 9522 target := &ret 9523 if err := gensupport.DecodeResponse(target, res); err != nil { 9524 return nil, err 9525 } 9526 return ret, nil 9527 // { 9528 // "description": "Updates a CustomDimension on a property.", 9529 // "flatPath": "v1alpha/properties/{propertiesId}/customDimensions/{customDimensionsId}", 9530 // "httpMethod": "PATCH", 9531 // "id": "analyticsadmin.properties.customDimensions.patch", 9532 // "parameterOrder": [ 9533 // "name" 9534 // ], 9535 // "parameters": { 9536 // "name": { 9537 // "description": "Output only. Resource name for this CustomDimension resource. Format: properties/{property}/customDimensions/{customDimension}", 9538 // "location": "path", 9539 // "pattern": "^properties/[^/]+/customDimensions/[^/]+$", 9540 // "required": true, 9541 // "type": "string" 9542 // }, 9543 // "updateMask": { 9544 // "description": "Required. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string \"*\" to match all fields.", 9545 // "format": "google-fieldmask", 9546 // "location": "query", 9547 // "type": "string" 9548 // } 9549 // }, 9550 // "path": "v1alpha/{+name}", 9551 // "request": { 9552 // "$ref": "GoogleAnalyticsAdminV1alphaCustomDimension" 9553 // }, 9554 // "response": { 9555 // "$ref": "GoogleAnalyticsAdminV1alphaCustomDimension" 9556 // }, 9557 // "scopes": [ 9558 // "https://www.googleapis.com/auth/analytics.edit" 9559 // ] 9560 // } 9561 9562} 9563 9564// method id "analyticsadmin.properties.customMetrics.archive": 9565 9566type PropertiesCustomMetricsArchiveCall struct { 9567 s *Service 9568 name string 9569 googleanalyticsadminv1alphaarchivecustommetricrequest *GoogleAnalyticsAdminV1alphaArchiveCustomMetricRequest 9570 urlParams_ gensupport.URLParams 9571 ctx_ context.Context 9572 header_ http.Header 9573} 9574 9575// Archive: Archives a CustomMetric on a property. 9576// 9577// - name: The name of the CustomMetric to archive. Example format: 9578// properties/1234/customMetrics/5678. 9579func (r *PropertiesCustomMetricsService) Archive(name string, googleanalyticsadminv1alphaarchivecustommetricrequest *GoogleAnalyticsAdminV1alphaArchiveCustomMetricRequest) *PropertiesCustomMetricsArchiveCall { 9580 c := &PropertiesCustomMetricsArchiveCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9581 c.name = name 9582 c.googleanalyticsadminv1alphaarchivecustommetricrequest = googleanalyticsadminv1alphaarchivecustommetricrequest 9583 return c 9584} 9585 9586// Fields allows partial responses to be retrieved. See 9587// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9588// for more information. 9589func (c *PropertiesCustomMetricsArchiveCall) Fields(s ...googleapi.Field) *PropertiesCustomMetricsArchiveCall { 9590 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9591 return c 9592} 9593 9594// Context sets the context to be used in this call's Do method. Any 9595// pending HTTP request will be aborted if the provided context is 9596// canceled. 9597func (c *PropertiesCustomMetricsArchiveCall) Context(ctx context.Context) *PropertiesCustomMetricsArchiveCall { 9598 c.ctx_ = ctx 9599 return c 9600} 9601 9602// Header returns an http.Header that can be modified by the caller to 9603// add HTTP headers to the request. 9604func (c *PropertiesCustomMetricsArchiveCall) Header() http.Header { 9605 if c.header_ == nil { 9606 c.header_ = make(http.Header) 9607 } 9608 return c.header_ 9609} 9610 9611func (c *PropertiesCustomMetricsArchiveCall) doRequest(alt string) (*http.Response, error) { 9612 reqHeaders := make(http.Header) 9613 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9614 for k, v := range c.header_ { 9615 reqHeaders[k] = v 9616 } 9617 reqHeaders.Set("User-Agent", c.s.userAgent()) 9618 var body io.Reader = nil 9619 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaarchivecustommetricrequest) 9620 if err != nil { 9621 return nil, err 9622 } 9623 reqHeaders.Set("Content-Type", "application/json") 9624 c.urlParams_.Set("alt", alt) 9625 c.urlParams_.Set("prettyPrint", "false") 9626 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:archive") 9627 urls += "?" + c.urlParams_.Encode() 9628 req, err := http.NewRequest("POST", urls, body) 9629 if err != nil { 9630 return nil, err 9631 } 9632 req.Header = reqHeaders 9633 googleapi.Expand(req.URL, map[string]string{ 9634 "name": c.name, 9635 }) 9636 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9637} 9638 9639// Do executes the "analyticsadmin.properties.customMetrics.archive" call. 9640// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 9641// non-2xx status code is an error. Response headers are in either 9642// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 9643// returned at all) in error.(*googleapi.Error).Header. Use 9644// googleapi.IsNotModified to check whether the returned error was 9645// because http.StatusNotModified was returned. 9646func (c *PropertiesCustomMetricsArchiveCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 9647 gensupport.SetOptions(c.urlParams_, opts...) 9648 res, err := c.doRequest("json") 9649 if res != nil && res.StatusCode == http.StatusNotModified { 9650 if res.Body != nil { 9651 res.Body.Close() 9652 } 9653 return nil, &googleapi.Error{ 9654 Code: res.StatusCode, 9655 Header: res.Header, 9656 } 9657 } 9658 if err != nil { 9659 return nil, err 9660 } 9661 defer googleapi.CloseBody(res) 9662 if err := googleapi.CheckResponse(res); err != nil { 9663 return nil, err 9664 } 9665 ret := &GoogleProtobufEmpty{ 9666 ServerResponse: googleapi.ServerResponse{ 9667 Header: res.Header, 9668 HTTPStatusCode: res.StatusCode, 9669 }, 9670 } 9671 target := &ret 9672 if err := gensupport.DecodeResponse(target, res); err != nil { 9673 return nil, err 9674 } 9675 return ret, nil 9676 // { 9677 // "description": "Archives a CustomMetric on a property.", 9678 // "flatPath": "v1alpha/properties/{propertiesId}/customMetrics/{customMetricsId}:archive", 9679 // "httpMethod": "POST", 9680 // "id": "analyticsadmin.properties.customMetrics.archive", 9681 // "parameterOrder": [ 9682 // "name" 9683 // ], 9684 // "parameters": { 9685 // "name": { 9686 // "description": "Required. The name of the CustomMetric to archive. Example format: properties/1234/customMetrics/5678", 9687 // "location": "path", 9688 // "pattern": "^properties/[^/]+/customMetrics/[^/]+$", 9689 // "required": true, 9690 // "type": "string" 9691 // } 9692 // }, 9693 // "path": "v1alpha/{+name}:archive", 9694 // "request": { 9695 // "$ref": "GoogleAnalyticsAdminV1alphaArchiveCustomMetricRequest" 9696 // }, 9697 // "response": { 9698 // "$ref": "GoogleProtobufEmpty" 9699 // }, 9700 // "scopes": [ 9701 // "https://www.googleapis.com/auth/analytics.edit" 9702 // ] 9703 // } 9704 9705} 9706 9707// method id "analyticsadmin.properties.customMetrics.create": 9708 9709type PropertiesCustomMetricsCreateCall struct { 9710 s *Service 9711 parent string 9712 googleanalyticsadminv1alphacustommetric *GoogleAnalyticsAdminV1alphaCustomMetric 9713 urlParams_ gensupport.URLParams 9714 ctx_ context.Context 9715 header_ http.Header 9716} 9717 9718// Create: Creates a CustomMetric. 9719// 9720// - parent: Example format: properties/1234. 9721func (r *PropertiesCustomMetricsService) Create(parent string, googleanalyticsadminv1alphacustommetric *GoogleAnalyticsAdminV1alphaCustomMetric) *PropertiesCustomMetricsCreateCall { 9722 c := &PropertiesCustomMetricsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9723 c.parent = parent 9724 c.googleanalyticsadminv1alphacustommetric = googleanalyticsadminv1alphacustommetric 9725 return c 9726} 9727 9728// Fields allows partial responses to be retrieved. See 9729// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9730// for more information. 9731func (c *PropertiesCustomMetricsCreateCall) Fields(s ...googleapi.Field) *PropertiesCustomMetricsCreateCall { 9732 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9733 return c 9734} 9735 9736// Context sets the context to be used in this call's Do method. Any 9737// pending HTTP request will be aborted if the provided context is 9738// canceled. 9739func (c *PropertiesCustomMetricsCreateCall) Context(ctx context.Context) *PropertiesCustomMetricsCreateCall { 9740 c.ctx_ = ctx 9741 return c 9742} 9743 9744// Header returns an http.Header that can be modified by the caller to 9745// add HTTP headers to the request. 9746func (c *PropertiesCustomMetricsCreateCall) Header() http.Header { 9747 if c.header_ == nil { 9748 c.header_ = make(http.Header) 9749 } 9750 return c.header_ 9751} 9752 9753func (c *PropertiesCustomMetricsCreateCall) doRequest(alt string) (*http.Response, error) { 9754 reqHeaders := make(http.Header) 9755 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9756 for k, v := range c.header_ { 9757 reqHeaders[k] = v 9758 } 9759 reqHeaders.Set("User-Agent", c.s.userAgent()) 9760 var body io.Reader = nil 9761 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphacustommetric) 9762 if err != nil { 9763 return nil, err 9764 } 9765 reqHeaders.Set("Content-Type", "application/json") 9766 c.urlParams_.Set("alt", alt) 9767 c.urlParams_.Set("prettyPrint", "false") 9768 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/customMetrics") 9769 urls += "?" + c.urlParams_.Encode() 9770 req, err := http.NewRequest("POST", urls, body) 9771 if err != nil { 9772 return nil, err 9773 } 9774 req.Header = reqHeaders 9775 googleapi.Expand(req.URL, map[string]string{ 9776 "parent": c.parent, 9777 }) 9778 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9779} 9780 9781// Do executes the "analyticsadmin.properties.customMetrics.create" call. 9782// Exactly one of *GoogleAnalyticsAdminV1alphaCustomMetric or error will 9783// be non-nil. Any non-2xx status code is an error. Response headers are 9784// in either 9785// *GoogleAnalyticsAdminV1alphaCustomMetric.ServerResponse.Header or (if 9786// a response was returned at all) in error.(*googleapi.Error).Header. 9787// Use googleapi.IsNotModified to check whether the returned error was 9788// because http.StatusNotModified was returned. 9789func (c *PropertiesCustomMetricsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCustomMetric, error) { 9790 gensupport.SetOptions(c.urlParams_, opts...) 9791 res, err := c.doRequest("json") 9792 if res != nil && res.StatusCode == http.StatusNotModified { 9793 if res.Body != nil { 9794 res.Body.Close() 9795 } 9796 return nil, &googleapi.Error{ 9797 Code: res.StatusCode, 9798 Header: res.Header, 9799 } 9800 } 9801 if err != nil { 9802 return nil, err 9803 } 9804 defer googleapi.CloseBody(res) 9805 if err := googleapi.CheckResponse(res); err != nil { 9806 return nil, err 9807 } 9808 ret := &GoogleAnalyticsAdminV1alphaCustomMetric{ 9809 ServerResponse: googleapi.ServerResponse{ 9810 Header: res.Header, 9811 HTTPStatusCode: res.StatusCode, 9812 }, 9813 } 9814 target := &ret 9815 if err := gensupport.DecodeResponse(target, res); err != nil { 9816 return nil, err 9817 } 9818 return ret, nil 9819 // { 9820 // "description": "Creates a CustomMetric.", 9821 // "flatPath": "v1alpha/properties/{propertiesId}/customMetrics", 9822 // "httpMethod": "POST", 9823 // "id": "analyticsadmin.properties.customMetrics.create", 9824 // "parameterOrder": [ 9825 // "parent" 9826 // ], 9827 // "parameters": { 9828 // "parent": { 9829 // "description": "Required. Example format: properties/1234", 9830 // "location": "path", 9831 // "pattern": "^properties/[^/]+$", 9832 // "required": true, 9833 // "type": "string" 9834 // } 9835 // }, 9836 // "path": "v1alpha/{+parent}/customMetrics", 9837 // "request": { 9838 // "$ref": "GoogleAnalyticsAdminV1alphaCustomMetric" 9839 // }, 9840 // "response": { 9841 // "$ref": "GoogleAnalyticsAdminV1alphaCustomMetric" 9842 // }, 9843 // "scopes": [ 9844 // "https://www.googleapis.com/auth/analytics.edit" 9845 // ] 9846 // } 9847 9848} 9849 9850// method id "analyticsadmin.properties.customMetrics.get": 9851 9852type PropertiesCustomMetricsGetCall struct { 9853 s *Service 9854 name string 9855 urlParams_ gensupport.URLParams 9856 ifNoneMatch_ string 9857 ctx_ context.Context 9858 header_ http.Header 9859} 9860 9861// Get: Lookup for a single CustomMetric. 9862// 9863// - name: The name of the CustomMetric to get. Example format: 9864// properties/1234/customMetrics/5678. 9865func (r *PropertiesCustomMetricsService) Get(name string) *PropertiesCustomMetricsGetCall { 9866 c := &PropertiesCustomMetricsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9867 c.name = name 9868 return c 9869} 9870 9871// Fields allows partial responses to be retrieved. See 9872// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9873// for more information. 9874func (c *PropertiesCustomMetricsGetCall) Fields(s ...googleapi.Field) *PropertiesCustomMetricsGetCall { 9875 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9876 return c 9877} 9878 9879// IfNoneMatch sets the optional parameter which makes the operation 9880// fail if the object's ETag matches the given value. This is useful for 9881// getting updates only after the object has changed since the last 9882// request. Use googleapi.IsNotModified to check whether the response 9883// error from Do is the result of In-None-Match. 9884func (c *PropertiesCustomMetricsGetCall) IfNoneMatch(entityTag string) *PropertiesCustomMetricsGetCall { 9885 c.ifNoneMatch_ = entityTag 9886 return c 9887} 9888 9889// Context sets the context to be used in this call's Do method. Any 9890// pending HTTP request will be aborted if the provided context is 9891// canceled. 9892func (c *PropertiesCustomMetricsGetCall) Context(ctx context.Context) *PropertiesCustomMetricsGetCall { 9893 c.ctx_ = ctx 9894 return c 9895} 9896 9897// Header returns an http.Header that can be modified by the caller to 9898// add HTTP headers to the request. 9899func (c *PropertiesCustomMetricsGetCall) Header() http.Header { 9900 if c.header_ == nil { 9901 c.header_ = make(http.Header) 9902 } 9903 return c.header_ 9904} 9905 9906func (c *PropertiesCustomMetricsGetCall) doRequest(alt string) (*http.Response, error) { 9907 reqHeaders := make(http.Header) 9908 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 9909 for k, v := range c.header_ { 9910 reqHeaders[k] = v 9911 } 9912 reqHeaders.Set("User-Agent", c.s.userAgent()) 9913 if c.ifNoneMatch_ != "" { 9914 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9915 } 9916 var body io.Reader = nil 9917 c.urlParams_.Set("alt", alt) 9918 c.urlParams_.Set("prettyPrint", "false") 9919 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 9920 urls += "?" + c.urlParams_.Encode() 9921 req, err := http.NewRequest("GET", urls, body) 9922 if err != nil { 9923 return nil, err 9924 } 9925 req.Header = reqHeaders 9926 googleapi.Expand(req.URL, map[string]string{ 9927 "name": c.name, 9928 }) 9929 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9930} 9931 9932// Do executes the "analyticsadmin.properties.customMetrics.get" call. 9933// Exactly one of *GoogleAnalyticsAdminV1alphaCustomMetric or error will 9934// be non-nil. Any non-2xx status code is an error. Response headers are 9935// in either 9936// *GoogleAnalyticsAdminV1alphaCustomMetric.ServerResponse.Header or (if 9937// a response was returned at all) in error.(*googleapi.Error).Header. 9938// Use googleapi.IsNotModified to check whether the returned error was 9939// because http.StatusNotModified was returned. 9940func (c *PropertiesCustomMetricsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCustomMetric, error) { 9941 gensupport.SetOptions(c.urlParams_, opts...) 9942 res, err := c.doRequest("json") 9943 if res != nil && res.StatusCode == http.StatusNotModified { 9944 if res.Body != nil { 9945 res.Body.Close() 9946 } 9947 return nil, &googleapi.Error{ 9948 Code: res.StatusCode, 9949 Header: res.Header, 9950 } 9951 } 9952 if err != nil { 9953 return nil, err 9954 } 9955 defer googleapi.CloseBody(res) 9956 if err := googleapi.CheckResponse(res); err != nil { 9957 return nil, err 9958 } 9959 ret := &GoogleAnalyticsAdminV1alphaCustomMetric{ 9960 ServerResponse: googleapi.ServerResponse{ 9961 Header: res.Header, 9962 HTTPStatusCode: res.StatusCode, 9963 }, 9964 } 9965 target := &ret 9966 if err := gensupport.DecodeResponse(target, res); err != nil { 9967 return nil, err 9968 } 9969 return ret, nil 9970 // { 9971 // "description": "Lookup for a single CustomMetric.", 9972 // "flatPath": "v1alpha/properties/{propertiesId}/customMetrics/{customMetricsId}", 9973 // "httpMethod": "GET", 9974 // "id": "analyticsadmin.properties.customMetrics.get", 9975 // "parameterOrder": [ 9976 // "name" 9977 // ], 9978 // "parameters": { 9979 // "name": { 9980 // "description": "Required. The name of the CustomMetric to get. Example format: properties/1234/customMetrics/5678", 9981 // "location": "path", 9982 // "pattern": "^properties/[^/]+/customMetrics/[^/]+$", 9983 // "required": true, 9984 // "type": "string" 9985 // } 9986 // }, 9987 // "path": "v1alpha/{+name}", 9988 // "response": { 9989 // "$ref": "GoogleAnalyticsAdminV1alphaCustomMetric" 9990 // }, 9991 // "scopes": [ 9992 // "https://www.googleapis.com/auth/analytics.edit", 9993 // "https://www.googleapis.com/auth/analytics.readonly" 9994 // ] 9995 // } 9996 9997} 9998 9999// method id "analyticsadmin.properties.customMetrics.list": 10000 10001type PropertiesCustomMetricsListCall struct { 10002 s *Service 10003 parent string 10004 urlParams_ gensupport.URLParams 10005 ifNoneMatch_ string 10006 ctx_ context.Context 10007 header_ http.Header 10008} 10009 10010// List: Lists CustomMetrics on a property. 10011// 10012// - parent: Example format: properties/1234. 10013func (r *PropertiesCustomMetricsService) List(parent string) *PropertiesCustomMetricsListCall { 10014 c := &PropertiesCustomMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10015 c.parent = parent 10016 return c 10017} 10018 10019// PageSize sets the optional parameter "pageSize": The maximum number 10020// of resources to return. If unspecified, at most 50 resources will be 10021// returned. The maximum value is 200 (higher values will be coerced to 10022// the maximum). 10023func (c *PropertiesCustomMetricsListCall) PageSize(pageSize int64) *PropertiesCustomMetricsListCall { 10024 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10025 return c 10026} 10027 10028// PageToken sets the optional parameter "pageToken": A page token, 10029// received from a previous `ListCustomMetrics` call. Provide this to 10030// retrieve the subsequent page. When paginating, all other parameters 10031// provided to `ListCustomMetrics` must match the call that provided the 10032// page token. 10033func (c *PropertiesCustomMetricsListCall) PageToken(pageToken string) *PropertiesCustomMetricsListCall { 10034 c.urlParams_.Set("pageToken", pageToken) 10035 return c 10036} 10037 10038// Fields allows partial responses to be retrieved. See 10039// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10040// for more information. 10041func (c *PropertiesCustomMetricsListCall) Fields(s ...googleapi.Field) *PropertiesCustomMetricsListCall { 10042 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10043 return c 10044} 10045 10046// IfNoneMatch sets the optional parameter which makes the operation 10047// fail if the object's ETag matches the given value. This is useful for 10048// getting updates only after the object has changed since the last 10049// request. Use googleapi.IsNotModified to check whether the response 10050// error from Do is the result of In-None-Match. 10051func (c *PropertiesCustomMetricsListCall) IfNoneMatch(entityTag string) *PropertiesCustomMetricsListCall { 10052 c.ifNoneMatch_ = entityTag 10053 return c 10054} 10055 10056// Context sets the context to be used in this call's Do method. Any 10057// pending HTTP request will be aborted if the provided context is 10058// canceled. 10059func (c *PropertiesCustomMetricsListCall) Context(ctx context.Context) *PropertiesCustomMetricsListCall { 10060 c.ctx_ = ctx 10061 return c 10062} 10063 10064// Header returns an http.Header that can be modified by the caller to 10065// add HTTP headers to the request. 10066func (c *PropertiesCustomMetricsListCall) Header() http.Header { 10067 if c.header_ == nil { 10068 c.header_ = make(http.Header) 10069 } 10070 return c.header_ 10071} 10072 10073func (c *PropertiesCustomMetricsListCall) doRequest(alt string) (*http.Response, error) { 10074 reqHeaders := make(http.Header) 10075 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 10076 for k, v := range c.header_ { 10077 reqHeaders[k] = v 10078 } 10079 reqHeaders.Set("User-Agent", c.s.userAgent()) 10080 if c.ifNoneMatch_ != "" { 10081 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10082 } 10083 var body io.Reader = nil 10084 c.urlParams_.Set("alt", alt) 10085 c.urlParams_.Set("prettyPrint", "false") 10086 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/customMetrics") 10087 urls += "?" + c.urlParams_.Encode() 10088 req, err := http.NewRequest("GET", urls, body) 10089 if err != nil { 10090 return nil, err 10091 } 10092 req.Header = reqHeaders 10093 googleapi.Expand(req.URL, map[string]string{ 10094 "parent": c.parent, 10095 }) 10096 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10097} 10098 10099// Do executes the "analyticsadmin.properties.customMetrics.list" call. 10100// Exactly one of *GoogleAnalyticsAdminV1alphaListCustomMetricsResponse 10101// or error will be non-nil. Any non-2xx status code is an error. 10102// Response headers are in either 10103// *GoogleAnalyticsAdminV1alphaListCustomMetricsResponse.ServerResponse.H 10104// eader or (if a response was returned at all) in 10105// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10106// whether the returned error was because http.StatusNotModified was 10107// returned. 10108func (c *PropertiesCustomMetricsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListCustomMetricsResponse, error) { 10109 gensupport.SetOptions(c.urlParams_, opts...) 10110 res, err := c.doRequest("json") 10111 if res != nil && res.StatusCode == http.StatusNotModified { 10112 if res.Body != nil { 10113 res.Body.Close() 10114 } 10115 return nil, &googleapi.Error{ 10116 Code: res.StatusCode, 10117 Header: res.Header, 10118 } 10119 } 10120 if err != nil { 10121 return nil, err 10122 } 10123 defer googleapi.CloseBody(res) 10124 if err := googleapi.CheckResponse(res); err != nil { 10125 return nil, err 10126 } 10127 ret := &GoogleAnalyticsAdminV1alphaListCustomMetricsResponse{ 10128 ServerResponse: googleapi.ServerResponse{ 10129 Header: res.Header, 10130 HTTPStatusCode: res.StatusCode, 10131 }, 10132 } 10133 target := &ret 10134 if err := gensupport.DecodeResponse(target, res); err != nil { 10135 return nil, err 10136 } 10137 return ret, nil 10138 // { 10139 // "description": "Lists CustomMetrics on a property.", 10140 // "flatPath": "v1alpha/properties/{propertiesId}/customMetrics", 10141 // "httpMethod": "GET", 10142 // "id": "analyticsadmin.properties.customMetrics.list", 10143 // "parameterOrder": [ 10144 // "parent" 10145 // ], 10146 // "parameters": { 10147 // "pageSize": { 10148 // "description": "The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).", 10149 // "format": "int32", 10150 // "location": "query", 10151 // "type": "integer" 10152 // }, 10153 // "pageToken": { 10154 // "description": "A page token, received from a previous `ListCustomMetrics` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCustomMetrics` must match the call that provided the page token.", 10155 // "location": "query", 10156 // "type": "string" 10157 // }, 10158 // "parent": { 10159 // "description": "Required. Example format: properties/1234", 10160 // "location": "path", 10161 // "pattern": "^properties/[^/]+$", 10162 // "required": true, 10163 // "type": "string" 10164 // } 10165 // }, 10166 // "path": "v1alpha/{+parent}/customMetrics", 10167 // "response": { 10168 // "$ref": "GoogleAnalyticsAdminV1alphaListCustomMetricsResponse" 10169 // }, 10170 // "scopes": [ 10171 // "https://www.googleapis.com/auth/analytics.edit", 10172 // "https://www.googleapis.com/auth/analytics.readonly" 10173 // ] 10174 // } 10175 10176} 10177 10178// Pages invokes f for each page of results. 10179// A non-nil error returned from f will halt the iteration. 10180// The provided context supersedes any context provided to the Context method. 10181func (c *PropertiesCustomMetricsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListCustomMetricsResponse) error) error { 10182 c.ctx_ = ctx 10183 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 10184 for { 10185 x, err := c.Do() 10186 if err != nil { 10187 return err 10188 } 10189 if err := f(x); err != nil { 10190 return err 10191 } 10192 if x.NextPageToken == "" { 10193 return nil 10194 } 10195 c.PageToken(x.NextPageToken) 10196 } 10197} 10198 10199// method id "analyticsadmin.properties.customMetrics.patch": 10200 10201type PropertiesCustomMetricsPatchCall struct { 10202 s *Service 10203 name string 10204 googleanalyticsadminv1alphacustommetric *GoogleAnalyticsAdminV1alphaCustomMetric 10205 urlParams_ gensupport.URLParams 10206 ctx_ context.Context 10207 header_ http.Header 10208} 10209 10210// Patch: Updates a CustomMetric on a property. 10211// 10212// - name: Output only. Resource name for this CustomMetric resource. 10213// Format: properties/{property}/customMetrics/{customMetric}. 10214func (r *PropertiesCustomMetricsService) Patch(name string, googleanalyticsadminv1alphacustommetric *GoogleAnalyticsAdminV1alphaCustomMetric) *PropertiesCustomMetricsPatchCall { 10215 c := &PropertiesCustomMetricsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10216 c.name = name 10217 c.googleanalyticsadminv1alphacustommetric = googleanalyticsadminv1alphacustommetric 10218 return c 10219} 10220 10221// UpdateMask sets the optional parameter "updateMask": Required. The 10222// list of fields to be updated. Omitted fields will not be updated. To 10223// replace the entire entity, use one path with the string "*" to match 10224// all fields. 10225func (c *PropertiesCustomMetricsPatchCall) UpdateMask(updateMask string) *PropertiesCustomMetricsPatchCall { 10226 c.urlParams_.Set("updateMask", updateMask) 10227 return c 10228} 10229 10230// Fields allows partial responses to be retrieved. See 10231// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10232// for more information. 10233func (c *PropertiesCustomMetricsPatchCall) Fields(s ...googleapi.Field) *PropertiesCustomMetricsPatchCall { 10234 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10235 return c 10236} 10237 10238// Context sets the context to be used in this call's Do method. Any 10239// pending HTTP request will be aborted if the provided context is 10240// canceled. 10241func (c *PropertiesCustomMetricsPatchCall) Context(ctx context.Context) *PropertiesCustomMetricsPatchCall { 10242 c.ctx_ = ctx 10243 return c 10244} 10245 10246// Header returns an http.Header that can be modified by the caller to 10247// add HTTP headers to the request. 10248func (c *PropertiesCustomMetricsPatchCall) Header() http.Header { 10249 if c.header_ == nil { 10250 c.header_ = make(http.Header) 10251 } 10252 return c.header_ 10253} 10254 10255func (c *PropertiesCustomMetricsPatchCall) doRequest(alt string) (*http.Response, error) { 10256 reqHeaders := make(http.Header) 10257 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 10258 for k, v := range c.header_ { 10259 reqHeaders[k] = v 10260 } 10261 reqHeaders.Set("User-Agent", c.s.userAgent()) 10262 var body io.Reader = nil 10263 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphacustommetric) 10264 if err != nil { 10265 return nil, err 10266 } 10267 reqHeaders.Set("Content-Type", "application/json") 10268 c.urlParams_.Set("alt", alt) 10269 c.urlParams_.Set("prettyPrint", "false") 10270 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 10271 urls += "?" + c.urlParams_.Encode() 10272 req, err := http.NewRequest("PATCH", urls, body) 10273 if err != nil { 10274 return nil, err 10275 } 10276 req.Header = reqHeaders 10277 googleapi.Expand(req.URL, map[string]string{ 10278 "name": c.name, 10279 }) 10280 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10281} 10282 10283// Do executes the "analyticsadmin.properties.customMetrics.patch" call. 10284// Exactly one of *GoogleAnalyticsAdminV1alphaCustomMetric or error will 10285// be non-nil. Any non-2xx status code is an error. Response headers are 10286// in either 10287// *GoogleAnalyticsAdminV1alphaCustomMetric.ServerResponse.Header or (if 10288// a response was returned at all) in error.(*googleapi.Error).Header. 10289// Use googleapi.IsNotModified to check whether the returned error was 10290// because http.StatusNotModified was returned. 10291func (c *PropertiesCustomMetricsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCustomMetric, error) { 10292 gensupport.SetOptions(c.urlParams_, opts...) 10293 res, err := c.doRequest("json") 10294 if res != nil && res.StatusCode == http.StatusNotModified { 10295 if res.Body != nil { 10296 res.Body.Close() 10297 } 10298 return nil, &googleapi.Error{ 10299 Code: res.StatusCode, 10300 Header: res.Header, 10301 } 10302 } 10303 if err != nil { 10304 return nil, err 10305 } 10306 defer googleapi.CloseBody(res) 10307 if err := googleapi.CheckResponse(res); err != nil { 10308 return nil, err 10309 } 10310 ret := &GoogleAnalyticsAdminV1alphaCustomMetric{ 10311 ServerResponse: googleapi.ServerResponse{ 10312 Header: res.Header, 10313 HTTPStatusCode: res.StatusCode, 10314 }, 10315 } 10316 target := &ret 10317 if err := gensupport.DecodeResponse(target, res); err != nil { 10318 return nil, err 10319 } 10320 return ret, nil 10321 // { 10322 // "description": "Updates a CustomMetric on a property.", 10323 // "flatPath": "v1alpha/properties/{propertiesId}/customMetrics/{customMetricsId}", 10324 // "httpMethod": "PATCH", 10325 // "id": "analyticsadmin.properties.customMetrics.patch", 10326 // "parameterOrder": [ 10327 // "name" 10328 // ], 10329 // "parameters": { 10330 // "name": { 10331 // "description": "Output only. Resource name for this CustomMetric resource. Format: properties/{property}/customMetrics/{customMetric}", 10332 // "location": "path", 10333 // "pattern": "^properties/[^/]+/customMetrics/[^/]+$", 10334 // "required": true, 10335 // "type": "string" 10336 // }, 10337 // "updateMask": { 10338 // "description": "Required. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string \"*\" to match all fields.", 10339 // "format": "google-fieldmask", 10340 // "location": "query", 10341 // "type": "string" 10342 // } 10343 // }, 10344 // "path": "v1alpha/{+name}", 10345 // "request": { 10346 // "$ref": "GoogleAnalyticsAdminV1alphaCustomMetric" 10347 // }, 10348 // "response": { 10349 // "$ref": "GoogleAnalyticsAdminV1alphaCustomMetric" 10350 // }, 10351 // "scopes": [ 10352 // "https://www.googleapis.com/auth/analytics.edit" 10353 // ] 10354 // } 10355 10356} 10357 10358// method id "analyticsadmin.properties.firebaseLinks.create": 10359 10360type PropertiesFirebaseLinksCreateCall struct { 10361 s *Service 10362 parent string 10363 googleanalyticsadminv1alphafirebaselink *GoogleAnalyticsAdminV1alphaFirebaseLink 10364 urlParams_ gensupport.URLParams 10365 ctx_ context.Context 10366 header_ http.Header 10367} 10368 10369// Create: Creates a FirebaseLink. Properties can have at most one 10370// FirebaseLink. 10371// 10372// - parent: Format: properties/{property_id} Example: properties/1234. 10373func (r *PropertiesFirebaseLinksService) Create(parent string, googleanalyticsadminv1alphafirebaselink *GoogleAnalyticsAdminV1alphaFirebaseLink) *PropertiesFirebaseLinksCreateCall { 10374 c := &PropertiesFirebaseLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10375 c.parent = parent 10376 c.googleanalyticsadminv1alphafirebaselink = googleanalyticsadminv1alphafirebaselink 10377 return c 10378} 10379 10380// Fields allows partial responses to be retrieved. See 10381// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10382// for more information. 10383func (c *PropertiesFirebaseLinksCreateCall) Fields(s ...googleapi.Field) *PropertiesFirebaseLinksCreateCall { 10384 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10385 return c 10386} 10387 10388// Context sets the context to be used in this call's Do method. Any 10389// pending HTTP request will be aborted if the provided context is 10390// canceled. 10391func (c *PropertiesFirebaseLinksCreateCall) Context(ctx context.Context) *PropertiesFirebaseLinksCreateCall { 10392 c.ctx_ = ctx 10393 return c 10394} 10395 10396// Header returns an http.Header that can be modified by the caller to 10397// add HTTP headers to the request. 10398func (c *PropertiesFirebaseLinksCreateCall) Header() http.Header { 10399 if c.header_ == nil { 10400 c.header_ = make(http.Header) 10401 } 10402 return c.header_ 10403} 10404 10405func (c *PropertiesFirebaseLinksCreateCall) doRequest(alt string) (*http.Response, error) { 10406 reqHeaders := make(http.Header) 10407 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 10408 for k, v := range c.header_ { 10409 reqHeaders[k] = v 10410 } 10411 reqHeaders.Set("User-Agent", c.s.userAgent()) 10412 var body io.Reader = nil 10413 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphafirebaselink) 10414 if err != nil { 10415 return nil, err 10416 } 10417 reqHeaders.Set("Content-Type", "application/json") 10418 c.urlParams_.Set("alt", alt) 10419 c.urlParams_.Set("prettyPrint", "false") 10420 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/firebaseLinks") 10421 urls += "?" + c.urlParams_.Encode() 10422 req, err := http.NewRequest("POST", urls, body) 10423 if err != nil { 10424 return nil, err 10425 } 10426 req.Header = reqHeaders 10427 googleapi.Expand(req.URL, map[string]string{ 10428 "parent": c.parent, 10429 }) 10430 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10431} 10432 10433// Do executes the "analyticsadmin.properties.firebaseLinks.create" call. 10434// Exactly one of *GoogleAnalyticsAdminV1alphaFirebaseLink or error will 10435// be non-nil. Any non-2xx status code is an error. Response headers are 10436// in either 10437// *GoogleAnalyticsAdminV1alphaFirebaseLink.ServerResponse.Header or (if 10438// a response was returned at all) in error.(*googleapi.Error).Header. 10439// Use googleapi.IsNotModified to check whether the returned error was 10440// because http.StatusNotModified was returned. 10441func (c *PropertiesFirebaseLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaFirebaseLink, error) { 10442 gensupport.SetOptions(c.urlParams_, opts...) 10443 res, err := c.doRequest("json") 10444 if res != nil && res.StatusCode == http.StatusNotModified { 10445 if res.Body != nil { 10446 res.Body.Close() 10447 } 10448 return nil, &googleapi.Error{ 10449 Code: res.StatusCode, 10450 Header: res.Header, 10451 } 10452 } 10453 if err != nil { 10454 return nil, err 10455 } 10456 defer googleapi.CloseBody(res) 10457 if err := googleapi.CheckResponse(res); err != nil { 10458 return nil, err 10459 } 10460 ret := &GoogleAnalyticsAdminV1alphaFirebaseLink{ 10461 ServerResponse: googleapi.ServerResponse{ 10462 Header: res.Header, 10463 HTTPStatusCode: res.StatusCode, 10464 }, 10465 } 10466 target := &ret 10467 if err := gensupport.DecodeResponse(target, res); err != nil { 10468 return nil, err 10469 } 10470 return ret, nil 10471 // { 10472 // "description": "Creates a FirebaseLink. Properties can have at most one FirebaseLink.", 10473 // "flatPath": "v1alpha/properties/{propertiesId}/firebaseLinks", 10474 // "httpMethod": "POST", 10475 // "id": "analyticsadmin.properties.firebaseLinks.create", 10476 // "parameterOrder": [ 10477 // "parent" 10478 // ], 10479 // "parameters": { 10480 // "parent": { 10481 // "description": "Required. Format: properties/{property_id} Example: properties/1234", 10482 // "location": "path", 10483 // "pattern": "^properties/[^/]+$", 10484 // "required": true, 10485 // "type": "string" 10486 // } 10487 // }, 10488 // "path": "v1alpha/{+parent}/firebaseLinks", 10489 // "request": { 10490 // "$ref": "GoogleAnalyticsAdminV1alphaFirebaseLink" 10491 // }, 10492 // "response": { 10493 // "$ref": "GoogleAnalyticsAdminV1alphaFirebaseLink" 10494 // }, 10495 // "scopes": [ 10496 // "https://www.googleapis.com/auth/analytics.edit" 10497 // ] 10498 // } 10499 10500} 10501 10502// method id "analyticsadmin.properties.firebaseLinks.delete": 10503 10504type PropertiesFirebaseLinksDeleteCall struct { 10505 s *Service 10506 name string 10507 urlParams_ gensupport.URLParams 10508 ctx_ context.Context 10509 header_ http.Header 10510} 10511 10512// Delete: Deletes a FirebaseLink on a property 10513// 10514// - name: Format: 10515// properties/{property_id}/firebaseLinks/{firebase_link_id} Example: 10516// properties/1234/firebaseLinks/5678. 10517func (r *PropertiesFirebaseLinksService) Delete(name string) *PropertiesFirebaseLinksDeleteCall { 10518 c := &PropertiesFirebaseLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10519 c.name = name 10520 return c 10521} 10522 10523// Fields allows partial responses to be retrieved. See 10524// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10525// for more information. 10526func (c *PropertiesFirebaseLinksDeleteCall) Fields(s ...googleapi.Field) *PropertiesFirebaseLinksDeleteCall { 10527 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10528 return c 10529} 10530 10531// Context sets the context to be used in this call's Do method. Any 10532// pending HTTP request will be aborted if the provided context is 10533// canceled. 10534func (c *PropertiesFirebaseLinksDeleteCall) Context(ctx context.Context) *PropertiesFirebaseLinksDeleteCall { 10535 c.ctx_ = ctx 10536 return c 10537} 10538 10539// Header returns an http.Header that can be modified by the caller to 10540// add HTTP headers to the request. 10541func (c *PropertiesFirebaseLinksDeleteCall) Header() http.Header { 10542 if c.header_ == nil { 10543 c.header_ = make(http.Header) 10544 } 10545 return c.header_ 10546} 10547 10548func (c *PropertiesFirebaseLinksDeleteCall) doRequest(alt string) (*http.Response, error) { 10549 reqHeaders := make(http.Header) 10550 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 10551 for k, v := range c.header_ { 10552 reqHeaders[k] = v 10553 } 10554 reqHeaders.Set("User-Agent", c.s.userAgent()) 10555 var body io.Reader = nil 10556 c.urlParams_.Set("alt", alt) 10557 c.urlParams_.Set("prettyPrint", "false") 10558 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 10559 urls += "?" + c.urlParams_.Encode() 10560 req, err := http.NewRequest("DELETE", urls, body) 10561 if err != nil { 10562 return nil, err 10563 } 10564 req.Header = reqHeaders 10565 googleapi.Expand(req.URL, map[string]string{ 10566 "name": c.name, 10567 }) 10568 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10569} 10570 10571// Do executes the "analyticsadmin.properties.firebaseLinks.delete" call. 10572// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 10573// non-2xx status code is an error. Response headers are in either 10574// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 10575// returned at all) in error.(*googleapi.Error).Header. Use 10576// googleapi.IsNotModified to check whether the returned error was 10577// because http.StatusNotModified was returned. 10578func (c *PropertiesFirebaseLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 10579 gensupport.SetOptions(c.urlParams_, opts...) 10580 res, err := c.doRequest("json") 10581 if res != nil && res.StatusCode == http.StatusNotModified { 10582 if res.Body != nil { 10583 res.Body.Close() 10584 } 10585 return nil, &googleapi.Error{ 10586 Code: res.StatusCode, 10587 Header: res.Header, 10588 } 10589 } 10590 if err != nil { 10591 return nil, err 10592 } 10593 defer googleapi.CloseBody(res) 10594 if err := googleapi.CheckResponse(res); err != nil { 10595 return nil, err 10596 } 10597 ret := &GoogleProtobufEmpty{ 10598 ServerResponse: googleapi.ServerResponse{ 10599 Header: res.Header, 10600 HTTPStatusCode: res.StatusCode, 10601 }, 10602 } 10603 target := &ret 10604 if err := gensupport.DecodeResponse(target, res); err != nil { 10605 return nil, err 10606 } 10607 return ret, nil 10608 // { 10609 // "description": "Deletes a FirebaseLink on a property", 10610 // "flatPath": "v1alpha/properties/{propertiesId}/firebaseLinks/{firebaseLinksId}", 10611 // "httpMethod": "DELETE", 10612 // "id": "analyticsadmin.properties.firebaseLinks.delete", 10613 // "parameterOrder": [ 10614 // "name" 10615 // ], 10616 // "parameters": { 10617 // "name": { 10618 // "description": "Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} Example: properties/1234/firebaseLinks/5678", 10619 // "location": "path", 10620 // "pattern": "^properties/[^/]+/firebaseLinks/[^/]+$", 10621 // "required": true, 10622 // "type": "string" 10623 // } 10624 // }, 10625 // "path": "v1alpha/{+name}", 10626 // "response": { 10627 // "$ref": "GoogleProtobufEmpty" 10628 // }, 10629 // "scopes": [ 10630 // "https://www.googleapis.com/auth/analytics.edit" 10631 // ] 10632 // } 10633 10634} 10635 10636// method id "analyticsadmin.properties.firebaseLinks.list": 10637 10638type PropertiesFirebaseLinksListCall struct { 10639 s *Service 10640 parent string 10641 urlParams_ gensupport.URLParams 10642 ifNoneMatch_ string 10643 ctx_ context.Context 10644 header_ http.Header 10645} 10646 10647// List: Lists FirebaseLinks on a property. Properties can have at most 10648// one FirebaseLink. 10649// 10650// - parent: Format: properties/{property_id} Example: properties/1234. 10651func (r *PropertiesFirebaseLinksService) List(parent string) *PropertiesFirebaseLinksListCall { 10652 c := &PropertiesFirebaseLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10653 c.parent = parent 10654 return c 10655} 10656 10657// PageSize sets the optional parameter "pageSize": The maximum number 10658// of resources to return. The service may return fewer than this value, 10659// even if there are additional pages. If unspecified, at most 50 10660// resources will be returned. The maximum value is 200; (higher values 10661// will be coerced to the maximum) 10662func (c *PropertiesFirebaseLinksListCall) PageSize(pageSize int64) *PropertiesFirebaseLinksListCall { 10663 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10664 return c 10665} 10666 10667// PageToken sets the optional parameter "pageToken": A page token, 10668// received from a previous `ListFirebaseLinks` call. Provide this to 10669// retrieve the subsequent page. When paginating, all other parameters 10670// provided to `ListProperties` must match the call that provided the 10671// page token. 10672func (c *PropertiesFirebaseLinksListCall) PageToken(pageToken string) *PropertiesFirebaseLinksListCall { 10673 c.urlParams_.Set("pageToken", pageToken) 10674 return c 10675} 10676 10677// Fields allows partial responses to be retrieved. See 10678// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10679// for more information. 10680func (c *PropertiesFirebaseLinksListCall) Fields(s ...googleapi.Field) *PropertiesFirebaseLinksListCall { 10681 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10682 return c 10683} 10684 10685// IfNoneMatch sets the optional parameter which makes the operation 10686// fail if the object's ETag matches the given value. This is useful for 10687// getting updates only after the object has changed since the last 10688// request. Use googleapi.IsNotModified to check whether the response 10689// error from Do is the result of In-None-Match. 10690func (c *PropertiesFirebaseLinksListCall) IfNoneMatch(entityTag string) *PropertiesFirebaseLinksListCall { 10691 c.ifNoneMatch_ = entityTag 10692 return c 10693} 10694 10695// Context sets the context to be used in this call's Do method. Any 10696// pending HTTP request will be aborted if the provided context is 10697// canceled. 10698func (c *PropertiesFirebaseLinksListCall) Context(ctx context.Context) *PropertiesFirebaseLinksListCall { 10699 c.ctx_ = ctx 10700 return c 10701} 10702 10703// Header returns an http.Header that can be modified by the caller to 10704// add HTTP headers to the request. 10705func (c *PropertiesFirebaseLinksListCall) Header() http.Header { 10706 if c.header_ == nil { 10707 c.header_ = make(http.Header) 10708 } 10709 return c.header_ 10710} 10711 10712func (c *PropertiesFirebaseLinksListCall) doRequest(alt string) (*http.Response, error) { 10713 reqHeaders := make(http.Header) 10714 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 10715 for k, v := range c.header_ { 10716 reqHeaders[k] = v 10717 } 10718 reqHeaders.Set("User-Agent", c.s.userAgent()) 10719 if c.ifNoneMatch_ != "" { 10720 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10721 } 10722 var body io.Reader = nil 10723 c.urlParams_.Set("alt", alt) 10724 c.urlParams_.Set("prettyPrint", "false") 10725 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/firebaseLinks") 10726 urls += "?" + c.urlParams_.Encode() 10727 req, err := http.NewRequest("GET", urls, body) 10728 if err != nil { 10729 return nil, err 10730 } 10731 req.Header = reqHeaders 10732 googleapi.Expand(req.URL, map[string]string{ 10733 "parent": c.parent, 10734 }) 10735 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10736} 10737 10738// Do executes the "analyticsadmin.properties.firebaseLinks.list" call. 10739// Exactly one of *GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse 10740// or error will be non-nil. Any non-2xx status code is an error. 10741// Response headers are in either 10742// *GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse.ServerResponse.H 10743// eader or (if a response was returned at all) in 10744// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10745// whether the returned error was because http.StatusNotModified was 10746// returned. 10747func (c *PropertiesFirebaseLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse, error) { 10748 gensupport.SetOptions(c.urlParams_, opts...) 10749 res, err := c.doRequest("json") 10750 if res != nil && res.StatusCode == http.StatusNotModified { 10751 if res.Body != nil { 10752 res.Body.Close() 10753 } 10754 return nil, &googleapi.Error{ 10755 Code: res.StatusCode, 10756 Header: res.Header, 10757 } 10758 } 10759 if err != nil { 10760 return nil, err 10761 } 10762 defer googleapi.CloseBody(res) 10763 if err := googleapi.CheckResponse(res); err != nil { 10764 return nil, err 10765 } 10766 ret := &GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse{ 10767 ServerResponse: googleapi.ServerResponse{ 10768 Header: res.Header, 10769 HTTPStatusCode: res.StatusCode, 10770 }, 10771 } 10772 target := &ret 10773 if err := gensupport.DecodeResponse(target, res); err != nil { 10774 return nil, err 10775 } 10776 return ret, nil 10777 // { 10778 // "description": "Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink.", 10779 // "flatPath": "v1alpha/properties/{propertiesId}/firebaseLinks", 10780 // "httpMethod": "GET", 10781 // "id": "analyticsadmin.properties.firebaseLinks.list", 10782 // "parameterOrder": [ 10783 // "parent" 10784 // ], 10785 // "parameters": { 10786 // "pageSize": { 10787 // "description": "The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)", 10788 // "format": "int32", 10789 // "location": "query", 10790 // "type": "integer" 10791 // }, 10792 // "pageToken": { 10793 // "description": "A page token, received from a previous `ListFirebaseLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListProperties` must match the call that provided the page token.", 10794 // "location": "query", 10795 // "type": "string" 10796 // }, 10797 // "parent": { 10798 // "description": "Required. Format: properties/{property_id} Example: properties/1234", 10799 // "location": "path", 10800 // "pattern": "^properties/[^/]+$", 10801 // "required": true, 10802 // "type": "string" 10803 // } 10804 // }, 10805 // "path": "v1alpha/{+parent}/firebaseLinks", 10806 // "response": { 10807 // "$ref": "GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse" 10808 // }, 10809 // "scopes": [ 10810 // "https://www.googleapis.com/auth/analytics.edit", 10811 // "https://www.googleapis.com/auth/analytics.readonly" 10812 // ] 10813 // } 10814 10815} 10816 10817// Pages invokes f for each page of results. 10818// A non-nil error returned from f will halt the iteration. 10819// The provided context supersedes any context provided to the Context method. 10820func (c *PropertiesFirebaseLinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse) error) error { 10821 c.ctx_ = ctx 10822 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 10823 for { 10824 x, err := c.Do() 10825 if err != nil { 10826 return err 10827 } 10828 if err := f(x); err != nil { 10829 return err 10830 } 10831 if x.NextPageToken == "" { 10832 return nil 10833 } 10834 c.PageToken(x.NextPageToken) 10835 } 10836} 10837 10838// method id "analyticsadmin.properties.googleAdsLinks.create": 10839 10840type PropertiesGoogleAdsLinksCreateCall struct { 10841 s *Service 10842 parent string 10843 googleanalyticsadminv1alphagoogleadslink *GoogleAnalyticsAdminV1alphaGoogleAdsLink 10844 urlParams_ gensupport.URLParams 10845 ctx_ context.Context 10846 header_ http.Header 10847} 10848 10849// Create: Creates a GoogleAdsLink. 10850// 10851// - parent: Example format: properties/1234. 10852func (r *PropertiesGoogleAdsLinksService) Create(parent string, googleanalyticsadminv1alphagoogleadslink *GoogleAnalyticsAdminV1alphaGoogleAdsLink) *PropertiesGoogleAdsLinksCreateCall { 10853 c := &PropertiesGoogleAdsLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10854 c.parent = parent 10855 c.googleanalyticsadminv1alphagoogleadslink = googleanalyticsadminv1alphagoogleadslink 10856 return c 10857} 10858 10859// Fields allows partial responses to be retrieved. See 10860// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10861// for more information. 10862func (c *PropertiesGoogleAdsLinksCreateCall) Fields(s ...googleapi.Field) *PropertiesGoogleAdsLinksCreateCall { 10863 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10864 return c 10865} 10866 10867// Context sets the context to be used in this call's Do method. Any 10868// pending HTTP request will be aborted if the provided context is 10869// canceled. 10870func (c *PropertiesGoogleAdsLinksCreateCall) Context(ctx context.Context) *PropertiesGoogleAdsLinksCreateCall { 10871 c.ctx_ = ctx 10872 return c 10873} 10874 10875// Header returns an http.Header that can be modified by the caller to 10876// add HTTP headers to the request. 10877func (c *PropertiesGoogleAdsLinksCreateCall) Header() http.Header { 10878 if c.header_ == nil { 10879 c.header_ = make(http.Header) 10880 } 10881 return c.header_ 10882} 10883 10884func (c *PropertiesGoogleAdsLinksCreateCall) doRequest(alt string) (*http.Response, error) { 10885 reqHeaders := make(http.Header) 10886 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 10887 for k, v := range c.header_ { 10888 reqHeaders[k] = v 10889 } 10890 reqHeaders.Set("User-Agent", c.s.userAgent()) 10891 var body io.Reader = nil 10892 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphagoogleadslink) 10893 if err != nil { 10894 return nil, err 10895 } 10896 reqHeaders.Set("Content-Type", "application/json") 10897 c.urlParams_.Set("alt", alt) 10898 c.urlParams_.Set("prettyPrint", "false") 10899 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/googleAdsLinks") 10900 urls += "?" + c.urlParams_.Encode() 10901 req, err := http.NewRequest("POST", urls, body) 10902 if err != nil { 10903 return nil, err 10904 } 10905 req.Header = reqHeaders 10906 googleapi.Expand(req.URL, map[string]string{ 10907 "parent": c.parent, 10908 }) 10909 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10910} 10911 10912// Do executes the "analyticsadmin.properties.googleAdsLinks.create" call. 10913// Exactly one of *GoogleAnalyticsAdminV1alphaGoogleAdsLink or error 10914// will be non-nil. Any non-2xx status code is an error. Response 10915// headers are in either 10916// *GoogleAnalyticsAdminV1alphaGoogleAdsLink.ServerResponse.Header or 10917// (if a response was returned at all) in 10918// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10919// whether the returned error was because http.StatusNotModified was 10920// returned. 10921func (c *PropertiesGoogleAdsLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaGoogleAdsLink, error) { 10922 gensupport.SetOptions(c.urlParams_, opts...) 10923 res, err := c.doRequest("json") 10924 if res != nil && res.StatusCode == http.StatusNotModified { 10925 if res.Body != nil { 10926 res.Body.Close() 10927 } 10928 return nil, &googleapi.Error{ 10929 Code: res.StatusCode, 10930 Header: res.Header, 10931 } 10932 } 10933 if err != nil { 10934 return nil, err 10935 } 10936 defer googleapi.CloseBody(res) 10937 if err := googleapi.CheckResponse(res); err != nil { 10938 return nil, err 10939 } 10940 ret := &GoogleAnalyticsAdminV1alphaGoogleAdsLink{ 10941 ServerResponse: googleapi.ServerResponse{ 10942 Header: res.Header, 10943 HTTPStatusCode: res.StatusCode, 10944 }, 10945 } 10946 target := &ret 10947 if err := gensupport.DecodeResponse(target, res); err != nil { 10948 return nil, err 10949 } 10950 return ret, nil 10951 // { 10952 // "description": "Creates a GoogleAdsLink.", 10953 // "flatPath": "v1alpha/properties/{propertiesId}/googleAdsLinks", 10954 // "httpMethod": "POST", 10955 // "id": "analyticsadmin.properties.googleAdsLinks.create", 10956 // "parameterOrder": [ 10957 // "parent" 10958 // ], 10959 // "parameters": { 10960 // "parent": { 10961 // "description": "Required. Example format: properties/1234", 10962 // "location": "path", 10963 // "pattern": "^properties/[^/]+$", 10964 // "required": true, 10965 // "type": "string" 10966 // } 10967 // }, 10968 // "path": "v1alpha/{+parent}/googleAdsLinks", 10969 // "request": { 10970 // "$ref": "GoogleAnalyticsAdminV1alphaGoogleAdsLink" 10971 // }, 10972 // "response": { 10973 // "$ref": "GoogleAnalyticsAdminV1alphaGoogleAdsLink" 10974 // }, 10975 // "scopes": [ 10976 // "https://www.googleapis.com/auth/analytics.edit" 10977 // ] 10978 // } 10979 10980} 10981 10982// method id "analyticsadmin.properties.googleAdsLinks.delete": 10983 10984type PropertiesGoogleAdsLinksDeleteCall struct { 10985 s *Service 10986 name string 10987 urlParams_ gensupport.URLParams 10988 ctx_ context.Context 10989 header_ http.Header 10990} 10991 10992// Delete: Deletes a GoogleAdsLink on a property 10993// 10994// - name: Example format: properties/1234/googleAdsLinks/5678. 10995func (r *PropertiesGoogleAdsLinksService) Delete(name string) *PropertiesGoogleAdsLinksDeleteCall { 10996 c := &PropertiesGoogleAdsLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10997 c.name = name 10998 return c 10999} 11000 11001// Fields allows partial responses to be retrieved. See 11002// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11003// for more information. 11004func (c *PropertiesGoogleAdsLinksDeleteCall) Fields(s ...googleapi.Field) *PropertiesGoogleAdsLinksDeleteCall { 11005 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11006 return c 11007} 11008 11009// Context sets the context to be used in this call's Do method. Any 11010// pending HTTP request will be aborted if the provided context is 11011// canceled. 11012func (c *PropertiesGoogleAdsLinksDeleteCall) Context(ctx context.Context) *PropertiesGoogleAdsLinksDeleteCall { 11013 c.ctx_ = ctx 11014 return c 11015} 11016 11017// Header returns an http.Header that can be modified by the caller to 11018// add HTTP headers to the request. 11019func (c *PropertiesGoogleAdsLinksDeleteCall) Header() http.Header { 11020 if c.header_ == nil { 11021 c.header_ = make(http.Header) 11022 } 11023 return c.header_ 11024} 11025 11026func (c *PropertiesGoogleAdsLinksDeleteCall) doRequest(alt string) (*http.Response, error) { 11027 reqHeaders := make(http.Header) 11028 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 11029 for k, v := range c.header_ { 11030 reqHeaders[k] = v 11031 } 11032 reqHeaders.Set("User-Agent", c.s.userAgent()) 11033 var body io.Reader = nil 11034 c.urlParams_.Set("alt", alt) 11035 c.urlParams_.Set("prettyPrint", "false") 11036 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 11037 urls += "?" + c.urlParams_.Encode() 11038 req, err := http.NewRequest("DELETE", urls, body) 11039 if err != nil { 11040 return nil, err 11041 } 11042 req.Header = reqHeaders 11043 googleapi.Expand(req.URL, map[string]string{ 11044 "name": c.name, 11045 }) 11046 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11047} 11048 11049// Do executes the "analyticsadmin.properties.googleAdsLinks.delete" call. 11050// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 11051// non-2xx status code is an error. Response headers are in either 11052// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 11053// returned at all) in error.(*googleapi.Error).Header. Use 11054// googleapi.IsNotModified to check whether the returned error was 11055// because http.StatusNotModified was returned. 11056func (c *PropertiesGoogleAdsLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 11057 gensupport.SetOptions(c.urlParams_, opts...) 11058 res, err := c.doRequest("json") 11059 if res != nil && res.StatusCode == http.StatusNotModified { 11060 if res.Body != nil { 11061 res.Body.Close() 11062 } 11063 return nil, &googleapi.Error{ 11064 Code: res.StatusCode, 11065 Header: res.Header, 11066 } 11067 } 11068 if err != nil { 11069 return nil, err 11070 } 11071 defer googleapi.CloseBody(res) 11072 if err := googleapi.CheckResponse(res); err != nil { 11073 return nil, err 11074 } 11075 ret := &GoogleProtobufEmpty{ 11076 ServerResponse: googleapi.ServerResponse{ 11077 Header: res.Header, 11078 HTTPStatusCode: res.StatusCode, 11079 }, 11080 } 11081 target := &ret 11082 if err := gensupport.DecodeResponse(target, res); err != nil { 11083 return nil, err 11084 } 11085 return ret, nil 11086 // { 11087 // "description": "Deletes a GoogleAdsLink on a property", 11088 // "flatPath": "v1alpha/properties/{propertiesId}/googleAdsLinks/{googleAdsLinksId}", 11089 // "httpMethod": "DELETE", 11090 // "id": "analyticsadmin.properties.googleAdsLinks.delete", 11091 // "parameterOrder": [ 11092 // "name" 11093 // ], 11094 // "parameters": { 11095 // "name": { 11096 // "description": "Required. Example format: properties/1234/googleAdsLinks/5678", 11097 // "location": "path", 11098 // "pattern": "^properties/[^/]+/googleAdsLinks/[^/]+$", 11099 // "required": true, 11100 // "type": "string" 11101 // } 11102 // }, 11103 // "path": "v1alpha/{+name}", 11104 // "response": { 11105 // "$ref": "GoogleProtobufEmpty" 11106 // }, 11107 // "scopes": [ 11108 // "https://www.googleapis.com/auth/analytics.edit" 11109 // ] 11110 // } 11111 11112} 11113 11114// method id "analyticsadmin.properties.googleAdsLinks.list": 11115 11116type PropertiesGoogleAdsLinksListCall struct { 11117 s *Service 11118 parent string 11119 urlParams_ gensupport.URLParams 11120 ifNoneMatch_ string 11121 ctx_ context.Context 11122 header_ http.Header 11123} 11124 11125// List: Lists GoogleAdsLinks on a property. 11126// 11127// - parent: Example format: properties/1234. 11128func (r *PropertiesGoogleAdsLinksService) List(parent string) *PropertiesGoogleAdsLinksListCall { 11129 c := &PropertiesGoogleAdsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11130 c.parent = parent 11131 return c 11132} 11133 11134// PageSize sets the optional parameter "pageSize": The maximum number 11135// of resources to return. If unspecified, at most 50 resources will be 11136// returned. The maximum value is 200 (higher values will be coerced to 11137// the maximum). 11138func (c *PropertiesGoogleAdsLinksListCall) PageSize(pageSize int64) *PropertiesGoogleAdsLinksListCall { 11139 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 11140 return c 11141} 11142 11143// PageToken sets the optional parameter "pageToken": A page token, 11144// received from a previous `ListGoogleAdsLinks` call. Provide this to 11145// retrieve the subsequent page. When paginating, all other parameters 11146// provided to `ListGoogleAdsLinks` must match the call that provided 11147// the page token. 11148func (c *PropertiesGoogleAdsLinksListCall) PageToken(pageToken string) *PropertiesGoogleAdsLinksListCall { 11149 c.urlParams_.Set("pageToken", pageToken) 11150 return c 11151} 11152 11153// Fields allows partial responses to be retrieved. See 11154// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11155// for more information. 11156func (c *PropertiesGoogleAdsLinksListCall) Fields(s ...googleapi.Field) *PropertiesGoogleAdsLinksListCall { 11157 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11158 return c 11159} 11160 11161// IfNoneMatch sets the optional parameter which makes the operation 11162// fail if the object's ETag matches the given value. This is useful for 11163// getting updates only after the object has changed since the last 11164// request. Use googleapi.IsNotModified to check whether the response 11165// error from Do is the result of In-None-Match. 11166func (c *PropertiesGoogleAdsLinksListCall) IfNoneMatch(entityTag string) *PropertiesGoogleAdsLinksListCall { 11167 c.ifNoneMatch_ = entityTag 11168 return c 11169} 11170 11171// Context sets the context to be used in this call's Do method. Any 11172// pending HTTP request will be aborted if the provided context is 11173// canceled. 11174func (c *PropertiesGoogleAdsLinksListCall) Context(ctx context.Context) *PropertiesGoogleAdsLinksListCall { 11175 c.ctx_ = ctx 11176 return c 11177} 11178 11179// Header returns an http.Header that can be modified by the caller to 11180// add HTTP headers to the request. 11181func (c *PropertiesGoogleAdsLinksListCall) Header() http.Header { 11182 if c.header_ == nil { 11183 c.header_ = make(http.Header) 11184 } 11185 return c.header_ 11186} 11187 11188func (c *PropertiesGoogleAdsLinksListCall) doRequest(alt string) (*http.Response, error) { 11189 reqHeaders := make(http.Header) 11190 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 11191 for k, v := range c.header_ { 11192 reqHeaders[k] = v 11193 } 11194 reqHeaders.Set("User-Agent", c.s.userAgent()) 11195 if c.ifNoneMatch_ != "" { 11196 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11197 } 11198 var body io.Reader = nil 11199 c.urlParams_.Set("alt", alt) 11200 c.urlParams_.Set("prettyPrint", "false") 11201 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/googleAdsLinks") 11202 urls += "?" + c.urlParams_.Encode() 11203 req, err := http.NewRequest("GET", urls, body) 11204 if err != nil { 11205 return nil, err 11206 } 11207 req.Header = reqHeaders 11208 googleapi.Expand(req.URL, map[string]string{ 11209 "parent": c.parent, 11210 }) 11211 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11212} 11213 11214// Do executes the "analyticsadmin.properties.googleAdsLinks.list" call. 11215// Exactly one of *GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse 11216// or error will be non-nil. Any non-2xx status code is an error. 11217// Response headers are in either 11218// *GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse.ServerResponse. 11219// Header or (if a response was returned at all) in 11220// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11221// whether the returned error was because http.StatusNotModified was 11222// returned. 11223func (c *PropertiesGoogleAdsLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse, error) { 11224 gensupport.SetOptions(c.urlParams_, opts...) 11225 res, err := c.doRequest("json") 11226 if res != nil && res.StatusCode == http.StatusNotModified { 11227 if res.Body != nil { 11228 res.Body.Close() 11229 } 11230 return nil, &googleapi.Error{ 11231 Code: res.StatusCode, 11232 Header: res.Header, 11233 } 11234 } 11235 if err != nil { 11236 return nil, err 11237 } 11238 defer googleapi.CloseBody(res) 11239 if err := googleapi.CheckResponse(res); err != nil { 11240 return nil, err 11241 } 11242 ret := &GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse{ 11243 ServerResponse: googleapi.ServerResponse{ 11244 Header: res.Header, 11245 HTTPStatusCode: res.StatusCode, 11246 }, 11247 } 11248 target := &ret 11249 if err := gensupport.DecodeResponse(target, res); err != nil { 11250 return nil, err 11251 } 11252 return ret, nil 11253 // { 11254 // "description": "Lists GoogleAdsLinks on a property.", 11255 // "flatPath": "v1alpha/properties/{propertiesId}/googleAdsLinks", 11256 // "httpMethod": "GET", 11257 // "id": "analyticsadmin.properties.googleAdsLinks.list", 11258 // "parameterOrder": [ 11259 // "parent" 11260 // ], 11261 // "parameters": { 11262 // "pageSize": { 11263 // "description": "The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).", 11264 // "format": "int32", 11265 // "location": "query", 11266 // "type": "integer" 11267 // }, 11268 // "pageToken": { 11269 // "description": "A page token, received from a previous `ListGoogleAdsLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListGoogleAdsLinks` must match the call that provided the page token.", 11270 // "location": "query", 11271 // "type": "string" 11272 // }, 11273 // "parent": { 11274 // "description": "Required. Example format: properties/1234", 11275 // "location": "path", 11276 // "pattern": "^properties/[^/]+$", 11277 // "required": true, 11278 // "type": "string" 11279 // } 11280 // }, 11281 // "path": "v1alpha/{+parent}/googleAdsLinks", 11282 // "response": { 11283 // "$ref": "GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse" 11284 // }, 11285 // "scopes": [ 11286 // "https://www.googleapis.com/auth/analytics.edit", 11287 // "https://www.googleapis.com/auth/analytics.readonly" 11288 // ] 11289 // } 11290 11291} 11292 11293// Pages invokes f for each page of results. 11294// A non-nil error returned from f will halt the iteration. 11295// The provided context supersedes any context provided to the Context method. 11296func (c *PropertiesGoogleAdsLinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse) error) error { 11297 c.ctx_ = ctx 11298 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 11299 for { 11300 x, err := c.Do() 11301 if err != nil { 11302 return err 11303 } 11304 if err := f(x); err != nil { 11305 return err 11306 } 11307 if x.NextPageToken == "" { 11308 return nil 11309 } 11310 c.PageToken(x.NextPageToken) 11311 } 11312} 11313 11314// method id "analyticsadmin.properties.googleAdsLinks.patch": 11315 11316type PropertiesGoogleAdsLinksPatchCall struct { 11317 s *Service 11318 name string 11319 googleanalyticsadminv1alphagoogleadslink *GoogleAnalyticsAdminV1alphaGoogleAdsLink 11320 urlParams_ gensupport.URLParams 11321 ctx_ context.Context 11322 header_ http.Header 11323} 11324 11325// Patch: Updates a GoogleAdsLink on a property 11326// 11327// - name: Output only. Format: 11328// properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} Note: 11329// googleAdsLinkId is not the Google Ads customer ID. 11330func (r *PropertiesGoogleAdsLinksService) Patch(name string, googleanalyticsadminv1alphagoogleadslink *GoogleAnalyticsAdminV1alphaGoogleAdsLink) *PropertiesGoogleAdsLinksPatchCall { 11331 c := &PropertiesGoogleAdsLinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11332 c.name = name 11333 c.googleanalyticsadminv1alphagoogleadslink = googleanalyticsadminv1alphagoogleadslink 11334 return c 11335} 11336 11337// UpdateMask sets the optional parameter "updateMask": Required. The 11338// list of fields to be updated. Field names must be in snake case 11339// (e.g., "field_to_update"). Omitted fields will not be updated. To 11340// replace the entire entity, use one path with the string "*" to match 11341// all fields. 11342func (c *PropertiesGoogleAdsLinksPatchCall) UpdateMask(updateMask string) *PropertiesGoogleAdsLinksPatchCall { 11343 c.urlParams_.Set("updateMask", updateMask) 11344 return c 11345} 11346 11347// Fields allows partial responses to be retrieved. See 11348// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11349// for more information. 11350func (c *PropertiesGoogleAdsLinksPatchCall) Fields(s ...googleapi.Field) *PropertiesGoogleAdsLinksPatchCall { 11351 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11352 return c 11353} 11354 11355// Context sets the context to be used in this call's Do method. Any 11356// pending HTTP request will be aborted if the provided context is 11357// canceled. 11358func (c *PropertiesGoogleAdsLinksPatchCall) Context(ctx context.Context) *PropertiesGoogleAdsLinksPatchCall { 11359 c.ctx_ = ctx 11360 return c 11361} 11362 11363// Header returns an http.Header that can be modified by the caller to 11364// add HTTP headers to the request. 11365func (c *PropertiesGoogleAdsLinksPatchCall) Header() http.Header { 11366 if c.header_ == nil { 11367 c.header_ = make(http.Header) 11368 } 11369 return c.header_ 11370} 11371 11372func (c *PropertiesGoogleAdsLinksPatchCall) doRequest(alt string) (*http.Response, error) { 11373 reqHeaders := make(http.Header) 11374 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 11375 for k, v := range c.header_ { 11376 reqHeaders[k] = v 11377 } 11378 reqHeaders.Set("User-Agent", c.s.userAgent()) 11379 var body io.Reader = nil 11380 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphagoogleadslink) 11381 if err != nil { 11382 return nil, err 11383 } 11384 reqHeaders.Set("Content-Type", "application/json") 11385 c.urlParams_.Set("alt", alt) 11386 c.urlParams_.Set("prettyPrint", "false") 11387 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 11388 urls += "?" + c.urlParams_.Encode() 11389 req, err := http.NewRequest("PATCH", urls, body) 11390 if err != nil { 11391 return nil, err 11392 } 11393 req.Header = reqHeaders 11394 googleapi.Expand(req.URL, map[string]string{ 11395 "name": c.name, 11396 }) 11397 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11398} 11399 11400// Do executes the "analyticsadmin.properties.googleAdsLinks.patch" call. 11401// Exactly one of *GoogleAnalyticsAdminV1alphaGoogleAdsLink or error 11402// will be non-nil. Any non-2xx status code is an error. Response 11403// headers are in either 11404// *GoogleAnalyticsAdminV1alphaGoogleAdsLink.ServerResponse.Header or 11405// (if a response was returned at all) in 11406// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11407// whether the returned error was because http.StatusNotModified was 11408// returned. 11409func (c *PropertiesGoogleAdsLinksPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaGoogleAdsLink, error) { 11410 gensupport.SetOptions(c.urlParams_, opts...) 11411 res, err := c.doRequest("json") 11412 if res != nil && res.StatusCode == http.StatusNotModified { 11413 if res.Body != nil { 11414 res.Body.Close() 11415 } 11416 return nil, &googleapi.Error{ 11417 Code: res.StatusCode, 11418 Header: res.Header, 11419 } 11420 } 11421 if err != nil { 11422 return nil, err 11423 } 11424 defer googleapi.CloseBody(res) 11425 if err := googleapi.CheckResponse(res); err != nil { 11426 return nil, err 11427 } 11428 ret := &GoogleAnalyticsAdminV1alphaGoogleAdsLink{ 11429 ServerResponse: googleapi.ServerResponse{ 11430 Header: res.Header, 11431 HTTPStatusCode: res.StatusCode, 11432 }, 11433 } 11434 target := &ret 11435 if err := gensupport.DecodeResponse(target, res); err != nil { 11436 return nil, err 11437 } 11438 return ret, nil 11439 // { 11440 // "description": "Updates a GoogleAdsLink on a property", 11441 // "flatPath": "v1alpha/properties/{propertiesId}/googleAdsLinks/{googleAdsLinksId}", 11442 // "httpMethod": "PATCH", 11443 // "id": "analyticsadmin.properties.googleAdsLinks.patch", 11444 // "parameterOrder": [ 11445 // "name" 11446 // ], 11447 // "parameters": { 11448 // "name": { 11449 // "description": "Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} Note: googleAdsLinkId is not the Google Ads customer ID.", 11450 // "location": "path", 11451 // "pattern": "^properties/[^/]+/googleAdsLinks/[^/]+$", 11452 // "required": true, 11453 // "type": "string" 11454 // }, 11455 // "updateMask": { 11456 // "description": "Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the entire entity, use one path with the string \"*\" to match all fields.", 11457 // "format": "google-fieldmask", 11458 // "location": "query", 11459 // "type": "string" 11460 // } 11461 // }, 11462 // "path": "v1alpha/{+name}", 11463 // "request": { 11464 // "$ref": "GoogleAnalyticsAdminV1alphaGoogleAdsLink" 11465 // }, 11466 // "response": { 11467 // "$ref": "GoogleAnalyticsAdminV1alphaGoogleAdsLink" 11468 // }, 11469 // "scopes": [ 11470 // "https://www.googleapis.com/auth/analytics.edit" 11471 // ] 11472 // } 11473 11474} 11475 11476// method id "analyticsadmin.properties.iosAppDataStreams.delete": 11477 11478type PropertiesIosAppDataStreamsDeleteCall struct { 11479 s *Service 11480 name string 11481 urlParams_ gensupport.URLParams 11482 ctx_ context.Context 11483 header_ http.Header 11484} 11485 11486// Delete: Deletes an iOS app stream on a property. 11487// 11488// - name: The name of the iOS app data stream to delete. Format: 11489// properties/{property_id}/iosAppDataStreams/{stream_id} Example: 11490// "properties/123/iosAppDataStreams/456". 11491func (r *PropertiesIosAppDataStreamsService) Delete(name string) *PropertiesIosAppDataStreamsDeleteCall { 11492 c := &PropertiesIosAppDataStreamsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11493 c.name = name 11494 return c 11495} 11496 11497// Fields allows partial responses to be retrieved. See 11498// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11499// for more information. 11500func (c *PropertiesIosAppDataStreamsDeleteCall) Fields(s ...googleapi.Field) *PropertiesIosAppDataStreamsDeleteCall { 11501 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11502 return c 11503} 11504 11505// Context sets the context to be used in this call's Do method. Any 11506// pending HTTP request will be aborted if the provided context is 11507// canceled. 11508func (c *PropertiesIosAppDataStreamsDeleteCall) Context(ctx context.Context) *PropertiesIosAppDataStreamsDeleteCall { 11509 c.ctx_ = ctx 11510 return c 11511} 11512 11513// Header returns an http.Header that can be modified by the caller to 11514// add HTTP headers to the request. 11515func (c *PropertiesIosAppDataStreamsDeleteCall) Header() http.Header { 11516 if c.header_ == nil { 11517 c.header_ = make(http.Header) 11518 } 11519 return c.header_ 11520} 11521 11522func (c *PropertiesIosAppDataStreamsDeleteCall) doRequest(alt string) (*http.Response, error) { 11523 reqHeaders := make(http.Header) 11524 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 11525 for k, v := range c.header_ { 11526 reqHeaders[k] = v 11527 } 11528 reqHeaders.Set("User-Agent", c.s.userAgent()) 11529 var body io.Reader = nil 11530 c.urlParams_.Set("alt", alt) 11531 c.urlParams_.Set("prettyPrint", "false") 11532 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 11533 urls += "?" + c.urlParams_.Encode() 11534 req, err := http.NewRequest("DELETE", urls, body) 11535 if err != nil { 11536 return nil, err 11537 } 11538 req.Header = reqHeaders 11539 googleapi.Expand(req.URL, map[string]string{ 11540 "name": c.name, 11541 }) 11542 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11543} 11544 11545// Do executes the "analyticsadmin.properties.iosAppDataStreams.delete" call. 11546// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 11547// non-2xx status code is an error. Response headers are in either 11548// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 11549// returned at all) in error.(*googleapi.Error).Header. Use 11550// googleapi.IsNotModified to check whether the returned error was 11551// because http.StatusNotModified was returned. 11552func (c *PropertiesIosAppDataStreamsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 11553 gensupport.SetOptions(c.urlParams_, opts...) 11554 res, err := c.doRequest("json") 11555 if res != nil && res.StatusCode == http.StatusNotModified { 11556 if res.Body != nil { 11557 res.Body.Close() 11558 } 11559 return nil, &googleapi.Error{ 11560 Code: res.StatusCode, 11561 Header: res.Header, 11562 } 11563 } 11564 if err != nil { 11565 return nil, err 11566 } 11567 defer googleapi.CloseBody(res) 11568 if err := googleapi.CheckResponse(res); err != nil { 11569 return nil, err 11570 } 11571 ret := &GoogleProtobufEmpty{ 11572 ServerResponse: googleapi.ServerResponse{ 11573 Header: res.Header, 11574 HTTPStatusCode: res.StatusCode, 11575 }, 11576 } 11577 target := &ret 11578 if err := gensupport.DecodeResponse(target, res); err != nil { 11579 return nil, err 11580 } 11581 return ret, nil 11582 // { 11583 // "description": "Deletes an iOS app stream on a property.", 11584 // "flatPath": "v1alpha/properties/{propertiesId}/iosAppDataStreams/{iosAppDataStreamsId}", 11585 // "httpMethod": "DELETE", 11586 // "id": "analyticsadmin.properties.iosAppDataStreams.delete", 11587 // "parameterOrder": [ 11588 // "name" 11589 // ], 11590 // "parameters": { 11591 // "name": { 11592 // "description": "Required. The name of the iOS app data stream to delete. Format: properties/{property_id}/iosAppDataStreams/{stream_id} Example: \"properties/123/iosAppDataStreams/456\"", 11593 // "location": "path", 11594 // "pattern": "^properties/[^/]+/iosAppDataStreams/[^/]+$", 11595 // "required": true, 11596 // "type": "string" 11597 // } 11598 // }, 11599 // "path": "v1alpha/{+name}", 11600 // "response": { 11601 // "$ref": "GoogleProtobufEmpty" 11602 // }, 11603 // "scopes": [ 11604 // "https://www.googleapis.com/auth/analytics.edit" 11605 // ] 11606 // } 11607 11608} 11609 11610// method id "analyticsadmin.properties.iosAppDataStreams.get": 11611 11612type PropertiesIosAppDataStreamsGetCall struct { 11613 s *Service 11614 name string 11615 urlParams_ gensupport.URLParams 11616 ifNoneMatch_ string 11617 ctx_ context.Context 11618 header_ http.Header 11619} 11620 11621// Get: Lookup for a single IosAppDataStream 11622// 11623// - name: The name of the iOS app data stream to lookup. Format: 11624// properties/{property_id}/iosAppDataStreams/{stream_id} Example: 11625// "properties/123/iosAppDataStreams/456". 11626func (r *PropertiesIosAppDataStreamsService) Get(name string) *PropertiesIosAppDataStreamsGetCall { 11627 c := &PropertiesIosAppDataStreamsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11628 c.name = name 11629 return c 11630} 11631 11632// Fields allows partial responses to be retrieved. See 11633// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11634// for more information. 11635func (c *PropertiesIosAppDataStreamsGetCall) Fields(s ...googleapi.Field) *PropertiesIosAppDataStreamsGetCall { 11636 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11637 return c 11638} 11639 11640// IfNoneMatch sets the optional parameter which makes the operation 11641// fail if the object's ETag matches the given value. This is useful for 11642// getting updates only after the object has changed since the last 11643// request. Use googleapi.IsNotModified to check whether the response 11644// error from Do is the result of In-None-Match. 11645func (c *PropertiesIosAppDataStreamsGetCall) IfNoneMatch(entityTag string) *PropertiesIosAppDataStreamsGetCall { 11646 c.ifNoneMatch_ = entityTag 11647 return c 11648} 11649 11650// Context sets the context to be used in this call's Do method. Any 11651// pending HTTP request will be aborted if the provided context is 11652// canceled. 11653func (c *PropertiesIosAppDataStreamsGetCall) Context(ctx context.Context) *PropertiesIosAppDataStreamsGetCall { 11654 c.ctx_ = ctx 11655 return c 11656} 11657 11658// Header returns an http.Header that can be modified by the caller to 11659// add HTTP headers to the request. 11660func (c *PropertiesIosAppDataStreamsGetCall) Header() http.Header { 11661 if c.header_ == nil { 11662 c.header_ = make(http.Header) 11663 } 11664 return c.header_ 11665} 11666 11667func (c *PropertiesIosAppDataStreamsGetCall) doRequest(alt string) (*http.Response, error) { 11668 reqHeaders := make(http.Header) 11669 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 11670 for k, v := range c.header_ { 11671 reqHeaders[k] = v 11672 } 11673 reqHeaders.Set("User-Agent", c.s.userAgent()) 11674 if c.ifNoneMatch_ != "" { 11675 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11676 } 11677 var body io.Reader = nil 11678 c.urlParams_.Set("alt", alt) 11679 c.urlParams_.Set("prettyPrint", "false") 11680 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 11681 urls += "?" + c.urlParams_.Encode() 11682 req, err := http.NewRequest("GET", urls, body) 11683 if err != nil { 11684 return nil, err 11685 } 11686 req.Header = reqHeaders 11687 googleapi.Expand(req.URL, map[string]string{ 11688 "name": c.name, 11689 }) 11690 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11691} 11692 11693// Do executes the "analyticsadmin.properties.iosAppDataStreams.get" call. 11694// Exactly one of *GoogleAnalyticsAdminV1alphaIosAppDataStream or error 11695// will be non-nil. Any non-2xx status code is an error. Response 11696// headers are in either 11697// *GoogleAnalyticsAdminV1alphaIosAppDataStream.ServerResponse.Header or 11698// (if a response was returned at all) in 11699// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11700// whether the returned error was because http.StatusNotModified was 11701// returned. 11702func (c *PropertiesIosAppDataStreamsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaIosAppDataStream, error) { 11703 gensupport.SetOptions(c.urlParams_, opts...) 11704 res, err := c.doRequest("json") 11705 if res != nil && res.StatusCode == http.StatusNotModified { 11706 if res.Body != nil { 11707 res.Body.Close() 11708 } 11709 return nil, &googleapi.Error{ 11710 Code: res.StatusCode, 11711 Header: res.Header, 11712 } 11713 } 11714 if err != nil { 11715 return nil, err 11716 } 11717 defer googleapi.CloseBody(res) 11718 if err := googleapi.CheckResponse(res); err != nil { 11719 return nil, err 11720 } 11721 ret := &GoogleAnalyticsAdminV1alphaIosAppDataStream{ 11722 ServerResponse: googleapi.ServerResponse{ 11723 Header: res.Header, 11724 HTTPStatusCode: res.StatusCode, 11725 }, 11726 } 11727 target := &ret 11728 if err := gensupport.DecodeResponse(target, res); err != nil { 11729 return nil, err 11730 } 11731 return ret, nil 11732 // { 11733 // "description": "Lookup for a single IosAppDataStream", 11734 // "flatPath": "v1alpha/properties/{propertiesId}/iosAppDataStreams/{iosAppDataStreamsId}", 11735 // "httpMethod": "GET", 11736 // "id": "analyticsadmin.properties.iosAppDataStreams.get", 11737 // "parameterOrder": [ 11738 // "name" 11739 // ], 11740 // "parameters": { 11741 // "name": { 11742 // "description": "Required. The name of the iOS app data stream to lookup. Format: properties/{property_id}/iosAppDataStreams/{stream_id} Example: \"properties/123/iosAppDataStreams/456\"", 11743 // "location": "path", 11744 // "pattern": "^properties/[^/]+/iosAppDataStreams/[^/]+$", 11745 // "required": true, 11746 // "type": "string" 11747 // } 11748 // }, 11749 // "path": "v1alpha/{+name}", 11750 // "response": { 11751 // "$ref": "GoogleAnalyticsAdminV1alphaIosAppDataStream" 11752 // }, 11753 // "scopes": [ 11754 // "https://www.googleapis.com/auth/analytics.edit", 11755 // "https://www.googleapis.com/auth/analytics.readonly" 11756 // ] 11757 // } 11758 11759} 11760 11761// method id "analyticsadmin.properties.iosAppDataStreams.list": 11762 11763type PropertiesIosAppDataStreamsListCall struct { 11764 s *Service 11765 parent string 11766 urlParams_ gensupport.URLParams 11767 ifNoneMatch_ string 11768 ctx_ context.Context 11769 header_ http.Header 11770} 11771 11772// List: Returns child iOS app data streams under the specified parent 11773// property. iOS app data streams will be excluded if the caller does 11774// not have access. Returns an empty list if no relevant iOS app data 11775// streams are found. 11776// 11777// - parent: The name of the parent property. For example, to list 11778// results of app streams under the property with Id 123: 11779// "properties/123". 11780func (r *PropertiesIosAppDataStreamsService) List(parent string) *PropertiesIosAppDataStreamsListCall { 11781 c := &PropertiesIosAppDataStreamsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11782 c.parent = parent 11783 return c 11784} 11785 11786// PageSize sets the optional parameter "pageSize": The maximum number 11787// of resources to return. If unspecified, at most 50 resources will be 11788// returned. The maximum value is 200; (higher values will be coerced to 11789// the maximum) 11790func (c *PropertiesIosAppDataStreamsListCall) PageSize(pageSize int64) *PropertiesIosAppDataStreamsListCall { 11791 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 11792 return c 11793} 11794 11795// PageToken sets the optional parameter "pageToken": A page token, 11796// received from a previous `ListIosAppDataStreams` call. Provide this 11797// to retrieve the subsequent page. When paginating, all other 11798// parameters provided to `ListIosAppDataStreams` must match the call 11799// that provided the page token. 11800func (c *PropertiesIosAppDataStreamsListCall) PageToken(pageToken string) *PropertiesIosAppDataStreamsListCall { 11801 c.urlParams_.Set("pageToken", pageToken) 11802 return c 11803} 11804 11805// Fields allows partial responses to be retrieved. See 11806// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11807// for more information. 11808func (c *PropertiesIosAppDataStreamsListCall) Fields(s ...googleapi.Field) *PropertiesIosAppDataStreamsListCall { 11809 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11810 return c 11811} 11812 11813// IfNoneMatch sets the optional parameter which makes the operation 11814// fail if the object's ETag matches the given value. This is useful for 11815// getting updates only after the object has changed since the last 11816// request. Use googleapi.IsNotModified to check whether the response 11817// error from Do is the result of In-None-Match. 11818func (c *PropertiesIosAppDataStreamsListCall) IfNoneMatch(entityTag string) *PropertiesIosAppDataStreamsListCall { 11819 c.ifNoneMatch_ = entityTag 11820 return c 11821} 11822 11823// Context sets the context to be used in this call's Do method. Any 11824// pending HTTP request will be aborted if the provided context is 11825// canceled. 11826func (c *PropertiesIosAppDataStreamsListCall) Context(ctx context.Context) *PropertiesIosAppDataStreamsListCall { 11827 c.ctx_ = ctx 11828 return c 11829} 11830 11831// Header returns an http.Header that can be modified by the caller to 11832// add HTTP headers to the request. 11833func (c *PropertiesIosAppDataStreamsListCall) Header() http.Header { 11834 if c.header_ == nil { 11835 c.header_ = make(http.Header) 11836 } 11837 return c.header_ 11838} 11839 11840func (c *PropertiesIosAppDataStreamsListCall) doRequest(alt string) (*http.Response, error) { 11841 reqHeaders := make(http.Header) 11842 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 11843 for k, v := range c.header_ { 11844 reqHeaders[k] = v 11845 } 11846 reqHeaders.Set("User-Agent", c.s.userAgent()) 11847 if c.ifNoneMatch_ != "" { 11848 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11849 } 11850 var body io.Reader = nil 11851 c.urlParams_.Set("alt", alt) 11852 c.urlParams_.Set("prettyPrint", "false") 11853 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/iosAppDataStreams") 11854 urls += "?" + c.urlParams_.Encode() 11855 req, err := http.NewRequest("GET", urls, body) 11856 if err != nil { 11857 return nil, err 11858 } 11859 req.Header = reqHeaders 11860 googleapi.Expand(req.URL, map[string]string{ 11861 "parent": c.parent, 11862 }) 11863 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11864} 11865 11866// Do executes the "analyticsadmin.properties.iosAppDataStreams.list" call. 11867// Exactly one of 11868// *GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse or error 11869// will be non-nil. Any non-2xx status code is an error. Response 11870// headers are in either 11871// *GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse.ServerRespon 11872// se.Header or (if a response was returned at all) in 11873// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11874// whether the returned error was because http.StatusNotModified was 11875// returned. 11876func (c *PropertiesIosAppDataStreamsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse, error) { 11877 gensupport.SetOptions(c.urlParams_, opts...) 11878 res, err := c.doRequest("json") 11879 if res != nil && res.StatusCode == http.StatusNotModified { 11880 if res.Body != nil { 11881 res.Body.Close() 11882 } 11883 return nil, &googleapi.Error{ 11884 Code: res.StatusCode, 11885 Header: res.Header, 11886 } 11887 } 11888 if err != nil { 11889 return nil, err 11890 } 11891 defer googleapi.CloseBody(res) 11892 if err := googleapi.CheckResponse(res); err != nil { 11893 return nil, err 11894 } 11895 ret := &GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse{ 11896 ServerResponse: googleapi.ServerResponse{ 11897 Header: res.Header, 11898 HTTPStatusCode: res.StatusCode, 11899 }, 11900 } 11901 target := &ret 11902 if err := gensupport.DecodeResponse(target, res); err != nil { 11903 return nil, err 11904 } 11905 return ret, nil 11906 // { 11907 // "description": "Returns child iOS app data streams under the specified parent property. iOS app data streams will be excluded if the caller does not have access. Returns an empty list if no relevant iOS app data streams are found.", 11908 // "flatPath": "v1alpha/properties/{propertiesId}/iosAppDataStreams", 11909 // "httpMethod": "GET", 11910 // "id": "analyticsadmin.properties.iosAppDataStreams.list", 11911 // "parameterOrder": [ 11912 // "parent" 11913 // ], 11914 // "parameters": { 11915 // "pageSize": { 11916 // "description": "The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)", 11917 // "format": "int32", 11918 // "location": "query", 11919 // "type": "integer" 11920 // }, 11921 // "pageToken": { 11922 // "description": "A page token, received from a previous `ListIosAppDataStreams` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListIosAppDataStreams` must match the call that provided the page token.", 11923 // "location": "query", 11924 // "type": "string" 11925 // }, 11926 // "parent": { 11927 // "description": "Required. The name of the parent property. For example, to list results of app streams under the property with Id 123: \"properties/123\"", 11928 // "location": "path", 11929 // "pattern": "^properties/[^/]+$", 11930 // "required": true, 11931 // "type": "string" 11932 // } 11933 // }, 11934 // "path": "v1alpha/{+parent}/iosAppDataStreams", 11935 // "response": { 11936 // "$ref": "GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse" 11937 // }, 11938 // "scopes": [ 11939 // "https://www.googleapis.com/auth/analytics.edit", 11940 // "https://www.googleapis.com/auth/analytics.readonly" 11941 // ] 11942 // } 11943 11944} 11945 11946// Pages invokes f for each page of results. 11947// A non-nil error returned from f will halt the iteration. 11948// The provided context supersedes any context provided to the Context method. 11949func (c *PropertiesIosAppDataStreamsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse) error) error { 11950 c.ctx_ = ctx 11951 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 11952 for { 11953 x, err := c.Do() 11954 if err != nil { 11955 return err 11956 } 11957 if err := f(x); err != nil { 11958 return err 11959 } 11960 if x.NextPageToken == "" { 11961 return nil 11962 } 11963 c.PageToken(x.NextPageToken) 11964 } 11965} 11966 11967// method id "analyticsadmin.properties.iosAppDataStreams.patch": 11968 11969type PropertiesIosAppDataStreamsPatchCall struct { 11970 s *Service 11971 name string 11972 googleanalyticsadminv1alphaiosappdatastream *GoogleAnalyticsAdminV1alphaIosAppDataStream 11973 urlParams_ gensupport.URLParams 11974 ctx_ context.Context 11975 header_ http.Header 11976} 11977 11978// Patch: Updates an iOS app stream on a property. 11979// 11980// - name: Output only. Resource name of this Data Stream. Format: 11981// properties/{property_id}/iosAppDataStreams/{stream_id} Example: 11982// "properties/1000/iosAppDataStreams/2000". 11983func (r *PropertiesIosAppDataStreamsService) Patch(name string, googleanalyticsadminv1alphaiosappdatastream *GoogleAnalyticsAdminV1alphaIosAppDataStream) *PropertiesIosAppDataStreamsPatchCall { 11984 c := &PropertiesIosAppDataStreamsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11985 c.name = name 11986 c.googleanalyticsadminv1alphaiosappdatastream = googleanalyticsadminv1alphaiosappdatastream 11987 return c 11988} 11989 11990// UpdateMask sets the optional parameter "updateMask": Required. The 11991// list of fields to be updated. Field names must be in snake case 11992// (e.g., "field_to_update"). Omitted fields will not be updated. To 11993// replace the entire entity, use one path with the string "*" to match 11994// all fields. 11995func (c *PropertiesIosAppDataStreamsPatchCall) UpdateMask(updateMask string) *PropertiesIosAppDataStreamsPatchCall { 11996 c.urlParams_.Set("updateMask", updateMask) 11997 return c 11998} 11999 12000// Fields allows partial responses to be retrieved. See 12001// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12002// for more information. 12003func (c *PropertiesIosAppDataStreamsPatchCall) Fields(s ...googleapi.Field) *PropertiesIosAppDataStreamsPatchCall { 12004 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12005 return c 12006} 12007 12008// Context sets the context to be used in this call's Do method. Any 12009// pending HTTP request will be aborted if the provided context is 12010// canceled. 12011func (c *PropertiesIosAppDataStreamsPatchCall) Context(ctx context.Context) *PropertiesIosAppDataStreamsPatchCall { 12012 c.ctx_ = ctx 12013 return c 12014} 12015 12016// Header returns an http.Header that can be modified by the caller to 12017// add HTTP headers to the request. 12018func (c *PropertiesIosAppDataStreamsPatchCall) Header() http.Header { 12019 if c.header_ == nil { 12020 c.header_ = make(http.Header) 12021 } 12022 return c.header_ 12023} 12024 12025func (c *PropertiesIosAppDataStreamsPatchCall) doRequest(alt string) (*http.Response, error) { 12026 reqHeaders := make(http.Header) 12027 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 12028 for k, v := range c.header_ { 12029 reqHeaders[k] = v 12030 } 12031 reqHeaders.Set("User-Agent", c.s.userAgent()) 12032 var body io.Reader = nil 12033 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaiosappdatastream) 12034 if err != nil { 12035 return nil, err 12036 } 12037 reqHeaders.Set("Content-Type", "application/json") 12038 c.urlParams_.Set("alt", alt) 12039 c.urlParams_.Set("prettyPrint", "false") 12040 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 12041 urls += "?" + c.urlParams_.Encode() 12042 req, err := http.NewRequest("PATCH", urls, body) 12043 if err != nil { 12044 return nil, err 12045 } 12046 req.Header = reqHeaders 12047 googleapi.Expand(req.URL, map[string]string{ 12048 "name": c.name, 12049 }) 12050 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12051} 12052 12053// Do executes the "analyticsadmin.properties.iosAppDataStreams.patch" call. 12054// Exactly one of *GoogleAnalyticsAdminV1alphaIosAppDataStream or error 12055// will be non-nil. Any non-2xx status code is an error. Response 12056// headers are in either 12057// *GoogleAnalyticsAdminV1alphaIosAppDataStream.ServerResponse.Header or 12058// (if a response was returned at all) in 12059// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12060// whether the returned error was because http.StatusNotModified was 12061// returned. 12062func (c *PropertiesIosAppDataStreamsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaIosAppDataStream, error) { 12063 gensupport.SetOptions(c.urlParams_, opts...) 12064 res, err := c.doRequest("json") 12065 if res != nil && res.StatusCode == http.StatusNotModified { 12066 if res.Body != nil { 12067 res.Body.Close() 12068 } 12069 return nil, &googleapi.Error{ 12070 Code: res.StatusCode, 12071 Header: res.Header, 12072 } 12073 } 12074 if err != nil { 12075 return nil, err 12076 } 12077 defer googleapi.CloseBody(res) 12078 if err := googleapi.CheckResponse(res); err != nil { 12079 return nil, err 12080 } 12081 ret := &GoogleAnalyticsAdminV1alphaIosAppDataStream{ 12082 ServerResponse: googleapi.ServerResponse{ 12083 Header: res.Header, 12084 HTTPStatusCode: res.StatusCode, 12085 }, 12086 } 12087 target := &ret 12088 if err := gensupport.DecodeResponse(target, res); err != nil { 12089 return nil, err 12090 } 12091 return ret, nil 12092 // { 12093 // "description": "Updates an iOS app stream on a property.", 12094 // "flatPath": "v1alpha/properties/{propertiesId}/iosAppDataStreams/{iosAppDataStreamsId}", 12095 // "httpMethod": "PATCH", 12096 // "id": "analyticsadmin.properties.iosAppDataStreams.patch", 12097 // "parameterOrder": [ 12098 // "name" 12099 // ], 12100 // "parameters": { 12101 // "name": { 12102 // "description": "Output only. Resource name of this Data Stream. Format: properties/{property_id}/iosAppDataStreams/{stream_id} Example: \"properties/1000/iosAppDataStreams/2000\"", 12103 // "location": "path", 12104 // "pattern": "^properties/[^/]+/iosAppDataStreams/[^/]+$", 12105 // "required": true, 12106 // "type": "string" 12107 // }, 12108 // "updateMask": { 12109 // "description": "Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the entire entity, use one path with the string \"*\" to match all fields.", 12110 // "format": "google-fieldmask", 12111 // "location": "query", 12112 // "type": "string" 12113 // } 12114 // }, 12115 // "path": "v1alpha/{+name}", 12116 // "request": { 12117 // "$ref": "GoogleAnalyticsAdminV1alphaIosAppDataStream" 12118 // }, 12119 // "response": { 12120 // "$ref": "GoogleAnalyticsAdminV1alphaIosAppDataStream" 12121 // }, 12122 // "scopes": [ 12123 // "https://www.googleapis.com/auth/analytics.edit" 12124 // ] 12125 // } 12126 12127} 12128 12129// method id "analyticsadmin.properties.iosAppDataStreams.measurementProtocolSecrets.create": 12130 12131type PropertiesIosAppDataStreamsMeasurementProtocolSecretsCreateCall struct { 12132 s *Service 12133 parent string 12134 googleanalyticsadminv1alphameasurementprotocolsecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret 12135 urlParams_ gensupport.URLParams 12136 ctx_ context.Context 12137 header_ http.Header 12138} 12139 12140// Create: Creates a measurement protocol secret. 12141// 12142// - parent: The parent resource where this secret will be created. Any 12143// type of stream (WebDataStream, IosAppDataStream, 12144// AndroidAppDataStream) may be a parent. Format: 12145// properties/{property}/webDataStreams/{webDataStream}. 12146func (r *PropertiesIosAppDataStreamsMeasurementProtocolSecretsService) Create(parent string, googleanalyticsadminv1alphameasurementprotocolsecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret) *PropertiesIosAppDataStreamsMeasurementProtocolSecretsCreateCall { 12147 c := &PropertiesIosAppDataStreamsMeasurementProtocolSecretsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12148 c.parent = parent 12149 c.googleanalyticsadminv1alphameasurementprotocolsecret = googleanalyticsadminv1alphameasurementprotocolsecret 12150 return c 12151} 12152 12153// Fields allows partial responses to be retrieved. See 12154// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12155// for more information. 12156func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsCreateCall) Fields(s ...googleapi.Field) *PropertiesIosAppDataStreamsMeasurementProtocolSecretsCreateCall { 12157 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12158 return c 12159} 12160 12161// Context sets the context to be used in this call's Do method. Any 12162// pending HTTP request will be aborted if the provided context is 12163// canceled. 12164func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsCreateCall) Context(ctx context.Context) *PropertiesIosAppDataStreamsMeasurementProtocolSecretsCreateCall { 12165 c.ctx_ = ctx 12166 return c 12167} 12168 12169// Header returns an http.Header that can be modified by the caller to 12170// add HTTP headers to the request. 12171func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsCreateCall) Header() http.Header { 12172 if c.header_ == nil { 12173 c.header_ = make(http.Header) 12174 } 12175 return c.header_ 12176} 12177 12178func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsCreateCall) doRequest(alt string) (*http.Response, error) { 12179 reqHeaders := make(http.Header) 12180 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 12181 for k, v := range c.header_ { 12182 reqHeaders[k] = v 12183 } 12184 reqHeaders.Set("User-Agent", c.s.userAgent()) 12185 var body io.Reader = nil 12186 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphameasurementprotocolsecret) 12187 if err != nil { 12188 return nil, err 12189 } 12190 reqHeaders.Set("Content-Type", "application/json") 12191 c.urlParams_.Set("alt", alt) 12192 c.urlParams_.Set("prettyPrint", "false") 12193 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/measurementProtocolSecrets") 12194 urls += "?" + c.urlParams_.Encode() 12195 req, err := http.NewRequest("POST", urls, body) 12196 if err != nil { 12197 return nil, err 12198 } 12199 req.Header = reqHeaders 12200 googleapi.Expand(req.URL, map[string]string{ 12201 "parent": c.parent, 12202 }) 12203 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12204} 12205 12206// Do executes the "analyticsadmin.properties.iosAppDataStreams.measurementProtocolSecrets.create" call. 12207// Exactly one of *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret 12208// or error will be non-nil. Any non-2xx status code is an error. 12209// Response headers are in either 12210// *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret.ServerResponse.H 12211// eader or (if a response was returned at all) in 12212// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12213// whether the returned error was because http.StatusNotModified was 12214// returned. 12215func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret, error) { 12216 gensupport.SetOptions(c.urlParams_, opts...) 12217 res, err := c.doRequest("json") 12218 if res != nil && res.StatusCode == http.StatusNotModified { 12219 if res.Body != nil { 12220 res.Body.Close() 12221 } 12222 return nil, &googleapi.Error{ 12223 Code: res.StatusCode, 12224 Header: res.Header, 12225 } 12226 } 12227 if err != nil { 12228 return nil, err 12229 } 12230 defer googleapi.CloseBody(res) 12231 if err := googleapi.CheckResponse(res); err != nil { 12232 return nil, err 12233 } 12234 ret := &GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret{ 12235 ServerResponse: googleapi.ServerResponse{ 12236 Header: res.Header, 12237 HTTPStatusCode: res.StatusCode, 12238 }, 12239 } 12240 target := &ret 12241 if err := gensupport.DecodeResponse(target, res); err != nil { 12242 return nil, err 12243 } 12244 return ret, nil 12245 // { 12246 // "description": "Creates a measurement protocol secret.", 12247 // "flatPath": "v1alpha/properties/{propertiesId}/iosAppDataStreams/{iosAppDataStreamsId}/measurementProtocolSecrets", 12248 // "httpMethod": "POST", 12249 // "id": "analyticsadmin.properties.iosAppDataStreams.measurementProtocolSecrets.create", 12250 // "parameterOrder": [ 12251 // "parent" 12252 // ], 12253 // "parameters": { 12254 // "parent": { 12255 // "description": "Required. The parent resource where this secret will be created. Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent. Format: properties/{property}/webDataStreams/{webDataStream}", 12256 // "location": "path", 12257 // "pattern": "^properties/[^/]+/iosAppDataStreams/[^/]+$", 12258 // "required": true, 12259 // "type": "string" 12260 // } 12261 // }, 12262 // "path": "v1alpha/{+parent}/measurementProtocolSecrets", 12263 // "request": { 12264 // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" 12265 // }, 12266 // "response": { 12267 // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" 12268 // }, 12269 // "scopes": [ 12270 // "https://www.googleapis.com/auth/analytics.edit" 12271 // ] 12272 // } 12273 12274} 12275 12276// method id "analyticsadmin.properties.iosAppDataStreams.measurementProtocolSecrets.delete": 12277 12278type PropertiesIosAppDataStreamsMeasurementProtocolSecretsDeleteCall struct { 12279 s *Service 12280 name string 12281 urlParams_ gensupport.URLParams 12282 ctx_ context.Context 12283 header_ http.Header 12284} 12285 12286// Delete: Deletes target MeasurementProtocolSecret. 12287// 12288// - name: The name of the MeasurementProtocolSecret to delete. Format: 12289// properties/{property}/webDataStreams/{webDataStream}/measurementProt 12290// ocolSecrets/{measurementProtocolSecret} Note: Any type of stream 12291// (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a 12292// parent. 12293func (r *PropertiesIosAppDataStreamsMeasurementProtocolSecretsService) Delete(name string) *PropertiesIosAppDataStreamsMeasurementProtocolSecretsDeleteCall { 12294 c := &PropertiesIosAppDataStreamsMeasurementProtocolSecretsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12295 c.name = name 12296 return c 12297} 12298 12299// Fields allows partial responses to be retrieved. See 12300// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12301// for more information. 12302func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsDeleteCall) Fields(s ...googleapi.Field) *PropertiesIosAppDataStreamsMeasurementProtocolSecretsDeleteCall { 12303 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12304 return c 12305} 12306 12307// Context sets the context to be used in this call's Do method. Any 12308// pending HTTP request will be aborted if the provided context is 12309// canceled. 12310func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsDeleteCall) Context(ctx context.Context) *PropertiesIosAppDataStreamsMeasurementProtocolSecretsDeleteCall { 12311 c.ctx_ = ctx 12312 return c 12313} 12314 12315// Header returns an http.Header that can be modified by the caller to 12316// add HTTP headers to the request. 12317func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsDeleteCall) Header() http.Header { 12318 if c.header_ == nil { 12319 c.header_ = make(http.Header) 12320 } 12321 return c.header_ 12322} 12323 12324func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsDeleteCall) doRequest(alt string) (*http.Response, error) { 12325 reqHeaders := make(http.Header) 12326 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 12327 for k, v := range c.header_ { 12328 reqHeaders[k] = v 12329 } 12330 reqHeaders.Set("User-Agent", c.s.userAgent()) 12331 var body io.Reader = nil 12332 c.urlParams_.Set("alt", alt) 12333 c.urlParams_.Set("prettyPrint", "false") 12334 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 12335 urls += "?" + c.urlParams_.Encode() 12336 req, err := http.NewRequest("DELETE", urls, body) 12337 if err != nil { 12338 return nil, err 12339 } 12340 req.Header = reqHeaders 12341 googleapi.Expand(req.URL, map[string]string{ 12342 "name": c.name, 12343 }) 12344 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12345} 12346 12347// Do executes the "analyticsadmin.properties.iosAppDataStreams.measurementProtocolSecrets.delete" call. 12348// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 12349// non-2xx status code is an error. Response headers are in either 12350// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 12351// returned at all) in error.(*googleapi.Error).Header. Use 12352// googleapi.IsNotModified to check whether the returned error was 12353// because http.StatusNotModified was returned. 12354func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 12355 gensupport.SetOptions(c.urlParams_, opts...) 12356 res, err := c.doRequest("json") 12357 if res != nil && res.StatusCode == http.StatusNotModified { 12358 if res.Body != nil { 12359 res.Body.Close() 12360 } 12361 return nil, &googleapi.Error{ 12362 Code: res.StatusCode, 12363 Header: res.Header, 12364 } 12365 } 12366 if err != nil { 12367 return nil, err 12368 } 12369 defer googleapi.CloseBody(res) 12370 if err := googleapi.CheckResponse(res); err != nil { 12371 return nil, err 12372 } 12373 ret := &GoogleProtobufEmpty{ 12374 ServerResponse: googleapi.ServerResponse{ 12375 Header: res.Header, 12376 HTTPStatusCode: res.StatusCode, 12377 }, 12378 } 12379 target := &ret 12380 if err := gensupport.DecodeResponse(target, res); err != nil { 12381 return nil, err 12382 } 12383 return ret, nil 12384 // { 12385 // "description": "Deletes target MeasurementProtocolSecret.", 12386 // "flatPath": "v1alpha/properties/{propertiesId}/iosAppDataStreams/{iosAppDataStreamsId}/measurementProtocolSecrets/{measurementProtocolSecretsId}", 12387 // "httpMethod": "DELETE", 12388 // "id": "analyticsadmin.properties.iosAppDataStreams.measurementProtocolSecrets.delete", 12389 // "parameterOrder": [ 12390 // "name" 12391 // ], 12392 // "parameters": { 12393 // "name": { 12394 // "description": "Required. The name of the MeasurementProtocolSecret to delete. Format: properties/{property}/webDataStreams/{webDataStream}/measurementProtocolSecrets/{measurementProtocolSecret} Note: Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent.", 12395 // "location": "path", 12396 // "pattern": "^properties/[^/]+/iosAppDataStreams/[^/]+/measurementProtocolSecrets/[^/]+$", 12397 // "required": true, 12398 // "type": "string" 12399 // } 12400 // }, 12401 // "path": "v1alpha/{+name}", 12402 // "response": { 12403 // "$ref": "GoogleProtobufEmpty" 12404 // }, 12405 // "scopes": [ 12406 // "https://www.googleapis.com/auth/analytics.edit" 12407 // ] 12408 // } 12409 12410} 12411 12412// method id "analyticsadmin.properties.iosAppDataStreams.measurementProtocolSecrets.get": 12413 12414type PropertiesIosAppDataStreamsMeasurementProtocolSecretsGetCall struct { 12415 s *Service 12416 name string 12417 urlParams_ gensupport.URLParams 12418 ifNoneMatch_ string 12419 ctx_ context.Context 12420 header_ http.Header 12421} 12422 12423// Get: Lookup for a single "GA4" MeasurementProtocolSecret. 12424// 12425// - name: The name of the measurement protocol secret to lookup. 12426// Format: 12427// properties/{property}/webDataStreams/{webDataStream}/measurementProt 12428// ocolSecrets/{measurementProtocolSecret} Note: Any type of stream 12429// (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a 12430// parent. 12431func (r *PropertiesIosAppDataStreamsMeasurementProtocolSecretsService) Get(name string) *PropertiesIosAppDataStreamsMeasurementProtocolSecretsGetCall { 12432 c := &PropertiesIosAppDataStreamsMeasurementProtocolSecretsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12433 c.name = name 12434 return c 12435} 12436 12437// Fields allows partial responses to be retrieved. See 12438// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12439// for more information. 12440func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsGetCall) Fields(s ...googleapi.Field) *PropertiesIosAppDataStreamsMeasurementProtocolSecretsGetCall { 12441 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12442 return c 12443} 12444 12445// IfNoneMatch sets the optional parameter which makes the operation 12446// fail if the object's ETag matches the given value. This is useful for 12447// getting updates only after the object has changed since the last 12448// request. Use googleapi.IsNotModified to check whether the response 12449// error from Do is the result of In-None-Match. 12450func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsGetCall) IfNoneMatch(entityTag string) *PropertiesIosAppDataStreamsMeasurementProtocolSecretsGetCall { 12451 c.ifNoneMatch_ = entityTag 12452 return c 12453} 12454 12455// Context sets the context to be used in this call's Do method. Any 12456// pending HTTP request will be aborted if the provided context is 12457// canceled. 12458func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsGetCall) Context(ctx context.Context) *PropertiesIosAppDataStreamsMeasurementProtocolSecretsGetCall { 12459 c.ctx_ = ctx 12460 return c 12461} 12462 12463// Header returns an http.Header that can be modified by the caller to 12464// add HTTP headers to the request. 12465func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsGetCall) Header() http.Header { 12466 if c.header_ == nil { 12467 c.header_ = make(http.Header) 12468 } 12469 return c.header_ 12470} 12471 12472func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsGetCall) doRequest(alt string) (*http.Response, error) { 12473 reqHeaders := make(http.Header) 12474 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 12475 for k, v := range c.header_ { 12476 reqHeaders[k] = v 12477 } 12478 reqHeaders.Set("User-Agent", c.s.userAgent()) 12479 if c.ifNoneMatch_ != "" { 12480 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12481 } 12482 var body io.Reader = nil 12483 c.urlParams_.Set("alt", alt) 12484 c.urlParams_.Set("prettyPrint", "false") 12485 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 12486 urls += "?" + c.urlParams_.Encode() 12487 req, err := http.NewRequest("GET", urls, body) 12488 if err != nil { 12489 return nil, err 12490 } 12491 req.Header = reqHeaders 12492 googleapi.Expand(req.URL, map[string]string{ 12493 "name": c.name, 12494 }) 12495 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12496} 12497 12498// Do executes the "analyticsadmin.properties.iosAppDataStreams.measurementProtocolSecrets.get" call. 12499// Exactly one of *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret 12500// or error will be non-nil. Any non-2xx status code is an error. 12501// Response headers are in either 12502// *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret.ServerResponse.H 12503// eader or (if a response was returned at all) in 12504// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12505// whether the returned error was because http.StatusNotModified was 12506// returned. 12507func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret, error) { 12508 gensupport.SetOptions(c.urlParams_, opts...) 12509 res, err := c.doRequest("json") 12510 if res != nil && res.StatusCode == http.StatusNotModified { 12511 if res.Body != nil { 12512 res.Body.Close() 12513 } 12514 return nil, &googleapi.Error{ 12515 Code: res.StatusCode, 12516 Header: res.Header, 12517 } 12518 } 12519 if err != nil { 12520 return nil, err 12521 } 12522 defer googleapi.CloseBody(res) 12523 if err := googleapi.CheckResponse(res); err != nil { 12524 return nil, err 12525 } 12526 ret := &GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret{ 12527 ServerResponse: googleapi.ServerResponse{ 12528 Header: res.Header, 12529 HTTPStatusCode: res.StatusCode, 12530 }, 12531 } 12532 target := &ret 12533 if err := gensupport.DecodeResponse(target, res); err != nil { 12534 return nil, err 12535 } 12536 return ret, nil 12537 // { 12538 // "description": "Lookup for a single \"GA4\" MeasurementProtocolSecret.", 12539 // "flatPath": "v1alpha/properties/{propertiesId}/iosAppDataStreams/{iosAppDataStreamsId}/measurementProtocolSecrets/{measurementProtocolSecretsId}", 12540 // "httpMethod": "GET", 12541 // "id": "analyticsadmin.properties.iosAppDataStreams.measurementProtocolSecrets.get", 12542 // "parameterOrder": [ 12543 // "name" 12544 // ], 12545 // "parameters": { 12546 // "name": { 12547 // "description": "Required. The name of the measurement protocol secret to lookup. Format: properties/{property}/webDataStreams/{webDataStream}/measurementProtocolSecrets/{measurementProtocolSecret} Note: Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent.", 12548 // "location": "path", 12549 // "pattern": "^properties/[^/]+/iosAppDataStreams/[^/]+/measurementProtocolSecrets/[^/]+$", 12550 // "required": true, 12551 // "type": "string" 12552 // } 12553 // }, 12554 // "path": "v1alpha/{+name}", 12555 // "response": { 12556 // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" 12557 // }, 12558 // "scopes": [ 12559 // "https://www.googleapis.com/auth/analytics.edit", 12560 // "https://www.googleapis.com/auth/analytics.readonly" 12561 // ] 12562 // } 12563 12564} 12565 12566// method id "analyticsadmin.properties.iosAppDataStreams.measurementProtocolSecrets.list": 12567 12568type PropertiesIosAppDataStreamsMeasurementProtocolSecretsListCall struct { 12569 s *Service 12570 parent string 12571 urlParams_ gensupport.URLParams 12572 ifNoneMatch_ string 12573 ctx_ context.Context 12574 header_ http.Header 12575} 12576 12577// List: Returns child MeasurementProtocolSecrets under the specified 12578// parent Property. 12579// 12580// - parent: The resource name of the parent stream. Any type of stream 12581// (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a 12582// parent. Format: 12583// properties/{property}/webDataStreams/{webDataStream}/measurementProt 12584// ocolSecrets. 12585func (r *PropertiesIosAppDataStreamsMeasurementProtocolSecretsService) List(parent string) *PropertiesIosAppDataStreamsMeasurementProtocolSecretsListCall { 12586 c := &PropertiesIosAppDataStreamsMeasurementProtocolSecretsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12587 c.parent = parent 12588 return c 12589} 12590 12591// PageSize sets the optional parameter "pageSize": The maximum number 12592// of resources to return. If unspecified, at most 10 resources will be 12593// returned. The maximum value is 10. Higher values will be coerced to 12594// the maximum. 12595func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsListCall) PageSize(pageSize int64) *PropertiesIosAppDataStreamsMeasurementProtocolSecretsListCall { 12596 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12597 return c 12598} 12599 12600// PageToken sets the optional parameter "pageToken": A page token, 12601// received from a previous `ListMeasurementProtocolSecrets` call. 12602// Provide this to retrieve the subsequent page. When paginating, all 12603// other parameters provided to `ListMeasurementProtocolSecrets` must 12604// match the call that provided the page token. 12605func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsListCall) PageToken(pageToken string) *PropertiesIosAppDataStreamsMeasurementProtocolSecretsListCall { 12606 c.urlParams_.Set("pageToken", pageToken) 12607 return c 12608} 12609 12610// Fields allows partial responses to be retrieved. See 12611// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12612// for more information. 12613func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsListCall) Fields(s ...googleapi.Field) *PropertiesIosAppDataStreamsMeasurementProtocolSecretsListCall { 12614 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12615 return c 12616} 12617 12618// IfNoneMatch sets the optional parameter which makes the operation 12619// fail if the object's ETag matches the given value. This is useful for 12620// getting updates only after the object has changed since the last 12621// request. Use googleapi.IsNotModified to check whether the response 12622// error from Do is the result of In-None-Match. 12623func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsListCall) IfNoneMatch(entityTag string) *PropertiesIosAppDataStreamsMeasurementProtocolSecretsListCall { 12624 c.ifNoneMatch_ = entityTag 12625 return c 12626} 12627 12628// Context sets the context to be used in this call's Do method. Any 12629// pending HTTP request will be aborted if the provided context is 12630// canceled. 12631func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsListCall) Context(ctx context.Context) *PropertiesIosAppDataStreamsMeasurementProtocolSecretsListCall { 12632 c.ctx_ = ctx 12633 return c 12634} 12635 12636// Header returns an http.Header that can be modified by the caller to 12637// add HTTP headers to the request. 12638func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsListCall) Header() http.Header { 12639 if c.header_ == nil { 12640 c.header_ = make(http.Header) 12641 } 12642 return c.header_ 12643} 12644 12645func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsListCall) doRequest(alt string) (*http.Response, error) { 12646 reqHeaders := make(http.Header) 12647 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 12648 for k, v := range c.header_ { 12649 reqHeaders[k] = v 12650 } 12651 reqHeaders.Set("User-Agent", c.s.userAgent()) 12652 if c.ifNoneMatch_ != "" { 12653 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12654 } 12655 var body io.Reader = nil 12656 c.urlParams_.Set("alt", alt) 12657 c.urlParams_.Set("prettyPrint", "false") 12658 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/measurementProtocolSecrets") 12659 urls += "?" + c.urlParams_.Encode() 12660 req, err := http.NewRequest("GET", urls, body) 12661 if err != nil { 12662 return nil, err 12663 } 12664 req.Header = reqHeaders 12665 googleapi.Expand(req.URL, map[string]string{ 12666 "parent": c.parent, 12667 }) 12668 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12669} 12670 12671// Do executes the "analyticsadmin.properties.iosAppDataStreams.measurementProtocolSecrets.list" call. 12672// Exactly one of 12673// *GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse or 12674// error will be non-nil. Any non-2xx status code is an error. Response 12675// headers are in either 12676// *GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse.Ser 12677// verResponse.Header or (if a response was returned at all) in 12678// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12679// whether the returned error was because http.StatusNotModified was 12680// returned. 12681func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse, error) { 12682 gensupport.SetOptions(c.urlParams_, opts...) 12683 res, err := c.doRequest("json") 12684 if res != nil && res.StatusCode == http.StatusNotModified { 12685 if res.Body != nil { 12686 res.Body.Close() 12687 } 12688 return nil, &googleapi.Error{ 12689 Code: res.StatusCode, 12690 Header: res.Header, 12691 } 12692 } 12693 if err != nil { 12694 return nil, err 12695 } 12696 defer googleapi.CloseBody(res) 12697 if err := googleapi.CheckResponse(res); err != nil { 12698 return nil, err 12699 } 12700 ret := &GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse{ 12701 ServerResponse: googleapi.ServerResponse{ 12702 Header: res.Header, 12703 HTTPStatusCode: res.StatusCode, 12704 }, 12705 } 12706 target := &ret 12707 if err := gensupport.DecodeResponse(target, res); err != nil { 12708 return nil, err 12709 } 12710 return ret, nil 12711 // { 12712 // "description": "Returns child MeasurementProtocolSecrets under the specified parent Property.", 12713 // "flatPath": "v1alpha/properties/{propertiesId}/iosAppDataStreams/{iosAppDataStreamsId}/measurementProtocolSecrets", 12714 // "httpMethod": "GET", 12715 // "id": "analyticsadmin.properties.iosAppDataStreams.measurementProtocolSecrets.list", 12716 // "parameterOrder": [ 12717 // "parent" 12718 // ], 12719 // "parameters": { 12720 // "pageSize": { 12721 // "description": "The maximum number of resources to return. If unspecified, at most 10 resources will be returned. The maximum value is 10. Higher values will be coerced to the maximum.", 12722 // "format": "int32", 12723 // "location": "query", 12724 // "type": "integer" 12725 // }, 12726 // "pageToken": { 12727 // "description": "A page token, received from a previous `ListMeasurementProtocolSecrets` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListMeasurementProtocolSecrets` must match the call that provided the page token.", 12728 // "location": "query", 12729 // "type": "string" 12730 // }, 12731 // "parent": { 12732 // "description": "Required. The resource name of the parent stream. Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent. Format: properties/{property}/webDataStreams/{webDataStream}/measurementProtocolSecrets", 12733 // "location": "path", 12734 // "pattern": "^properties/[^/]+/iosAppDataStreams/[^/]+$", 12735 // "required": true, 12736 // "type": "string" 12737 // } 12738 // }, 12739 // "path": "v1alpha/{+parent}/measurementProtocolSecrets", 12740 // "response": { 12741 // "$ref": "GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse" 12742 // }, 12743 // "scopes": [ 12744 // "https://www.googleapis.com/auth/analytics.edit", 12745 // "https://www.googleapis.com/auth/analytics.readonly" 12746 // ] 12747 // } 12748 12749} 12750 12751// Pages invokes f for each page of results. 12752// A non-nil error returned from f will halt the iteration. 12753// The provided context supersedes any context provided to the Context method. 12754func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse) error) error { 12755 c.ctx_ = ctx 12756 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 12757 for { 12758 x, err := c.Do() 12759 if err != nil { 12760 return err 12761 } 12762 if err := f(x); err != nil { 12763 return err 12764 } 12765 if x.NextPageToken == "" { 12766 return nil 12767 } 12768 c.PageToken(x.NextPageToken) 12769 } 12770} 12771 12772// method id "analyticsadmin.properties.iosAppDataStreams.measurementProtocolSecrets.patch": 12773 12774type PropertiesIosAppDataStreamsMeasurementProtocolSecretsPatchCall struct { 12775 s *Service 12776 name string 12777 googleanalyticsadminv1alphameasurementprotocolsecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret 12778 urlParams_ gensupport.URLParams 12779 ctx_ context.Context 12780 header_ http.Header 12781} 12782 12783// Patch: Updates a measurement protocol secret. 12784// 12785// - name: Output only. Resource name of this secret. This secret may be 12786// a child of any type of stream. Format: 12787// properties/{property}/webDataStreams/{webDataStream}/measurementProt 12788// ocolSecrets/{measurementProtocolSecret}. 12789func (r *PropertiesIosAppDataStreamsMeasurementProtocolSecretsService) Patch(name string, googleanalyticsadminv1alphameasurementprotocolsecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret) *PropertiesIosAppDataStreamsMeasurementProtocolSecretsPatchCall { 12790 c := &PropertiesIosAppDataStreamsMeasurementProtocolSecretsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12791 c.name = name 12792 c.googleanalyticsadminv1alphameasurementprotocolsecret = googleanalyticsadminv1alphameasurementprotocolsecret 12793 return c 12794} 12795 12796// UpdateMask sets the optional parameter "updateMask": The list of 12797// fields to be updated. Omitted fields will not be updated. 12798func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsPatchCall) UpdateMask(updateMask string) *PropertiesIosAppDataStreamsMeasurementProtocolSecretsPatchCall { 12799 c.urlParams_.Set("updateMask", updateMask) 12800 return c 12801} 12802 12803// Fields allows partial responses to be retrieved. See 12804// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12805// for more information. 12806func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsPatchCall) Fields(s ...googleapi.Field) *PropertiesIosAppDataStreamsMeasurementProtocolSecretsPatchCall { 12807 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12808 return c 12809} 12810 12811// Context sets the context to be used in this call's Do method. Any 12812// pending HTTP request will be aborted if the provided context is 12813// canceled. 12814func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsPatchCall) Context(ctx context.Context) *PropertiesIosAppDataStreamsMeasurementProtocolSecretsPatchCall { 12815 c.ctx_ = ctx 12816 return c 12817} 12818 12819// Header returns an http.Header that can be modified by the caller to 12820// add HTTP headers to the request. 12821func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsPatchCall) Header() http.Header { 12822 if c.header_ == nil { 12823 c.header_ = make(http.Header) 12824 } 12825 return c.header_ 12826} 12827 12828func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsPatchCall) doRequest(alt string) (*http.Response, error) { 12829 reqHeaders := make(http.Header) 12830 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 12831 for k, v := range c.header_ { 12832 reqHeaders[k] = v 12833 } 12834 reqHeaders.Set("User-Agent", c.s.userAgent()) 12835 var body io.Reader = nil 12836 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphameasurementprotocolsecret) 12837 if err != nil { 12838 return nil, err 12839 } 12840 reqHeaders.Set("Content-Type", "application/json") 12841 c.urlParams_.Set("alt", alt) 12842 c.urlParams_.Set("prettyPrint", "false") 12843 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 12844 urls += "?" + c.urlParams_.Encode() 12845 req, err := http.NewRequest("PATCH", urls, body) 12846 if err != nil { 12847 return nil, err 12848 } 12849 req.Header = reqHeaders 12850 googleapi.Expand(req.URL, map[string]string{ 12851 "name": c.name, 12852 }) 12853 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12854} 12855 12856// Do executes the "analyticsadmin.properties.iosAppDataStreams.measurementProtocolSecrets.patch" call. 12857// Exactly one of *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret 12858// or error will be non-nil. Any non-2xx status code is an error. 12859// Response headers are in either 12860// *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret.ServerResponse.H 12861// eader or (if a response was returned at all) in 12862// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12863// whether the returned error was because http.StatusNotModified was 12864// returned. 12865func (c *PropertiesIosAppDataStreamsMeasurementProtocolSecretsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret, error) { 12866 gensupport.SetOptions(c.urlParams_, opts...) 12867 res, err := c.doRequest("json") 12868 if res != nil && res.StatusCode == http.StatusNotModified { 12869 if res.Body != nil { 12870 res.Body.Close() 12871 } 12872 return nil, &googleapi.Error{ 12873 Code: res.StatusCode, 12874 Header: res.Header, 12875 } 12876 } 12877 if err != nil { 12878 return nil, err 12879 } 12880 defer googleapi.CloseBody(res) 12881 if err := googleapi.CheckResponse(res); err != nil { 12882 return nil, err 12883 } 12884 ret := &GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret{ 12885 ServerResponse: googleapi.ServerResponse{ 12886 Header: res.Header, 12887 HTTPStatusCode: res.StatusCode, 12888 }, 12889 } 12890 target := &ret 12891 if err := gensupport.DecodeResponse(target, res); err != nil { 12892 return nil, err 12893 } 12894 return ret, nil 12895 // { 12896 // "description": "Updates a measurement protocol secret.", 12897 // "flatPath": "v1alpha/properties/{propertiesId}/iosAppDataStreams/{iosAppDataStreamsId}/measurementProtocolSecrets/{measurementProtocolSecretsId}", 12898 // "httpMethod": "PATCH", 12899 // "id": "analyticsadmin.properties.iosAppDataStreams.measurementProtocolSecrets.patch", 12900 // "parameterOrder": [ 12901 // "name" 12902 // ], 12903 // "parameters": { 12904 // "name": { 12905 // "description": "Output only. Resource name of this secret. This secret may be a child of any type of stream. Format: properties/{property}/webDataStreams/{webDataStream}/measurementProtocolSecrets/{measurementProtocolSecret}", 12906 // "location": "path", 12907 // "pattern": "^properties/[^/]+/iosAppDataStreams/[^/]+/measurementProtocolSecrets/[^/]+$", 12908 // "required": true, 12909 // "type": "string" 12910 // }, 12911 // "updateMask": { 12912 // "description": "The list of fields to be updated. Omitted fields will not be updated.", 12913 // "format": "google-fieldmask", 12914 // "location": "query", 12915 // "type": "string" 12916 // } 12917 // }, 12918 // "path": "v1alpha/{+name}", 12919 // "request": { 12920 // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" 12921 // }, 12922 // "response": { 12923 // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" 12924 // }, 12925 // "scopes": [ 12926 // "https://www.googleapis.com/auth/analytics.edit" 12927 // ] 12928 // } 12929 12930} 12931 12932// method id "analyticsadmin.properties.userLinks.audit": 12933 12934type PropertiesUserLinksAuditCall struct { 12935 s *Service 12936 parent string 12937 googleanalyticsadminv1alphaaudituserlinksrequest *GoogleAnalyticsAdminV1alphaAuditUserLinksRequest 12938 urlParams_ gensupport.URLParams 12939 ctx_ context.Context 12940 header_ http.Header 12941} 12942 12943// Audit: Lists all user links on an account or property, including 12944// implicit ones that come from effective permissions granted by groups 12945// or organization admin roles. If a returned user link does not have 12946// direct permissions, they cannot be removed from the account or 12947// property directly with the DeleteUserLink command. They have to be 12948// removed from the group/etc that gives them permissions, which is 12949// currently only usable/discoverable in the GA or GMP UIs. 12950// 12951// - parent: Example format: accounts/1234. 12952func (r *PropertiesUserLinksService) Audit(parent string, googleanalyticsadminv1alphaaudituserlinksrequest *GoogleAnalyticsAdminV1alphaAuditUserLinksRequest) *PropertiesUserLinksAuditCall { 12953 c := &PropertiesUserLinksAuditCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12954 c.parent = parent 12955 c.googleanalyticsadminv1alphaaudituserlinksrequest = googleanalyticsadminv1alphaaudituserlinksrequest 12956 return c 12957} 12958 12959// Fields allows partial responses to be retrieved. See 12960// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12961// for more information. 12962func (c *PropertiesUserLinksAuditCall) Fields(s ...googleapi.Field) *PropertiesUserLinksAuditCall { 12963 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12964 return c 12965} 12966 12967// Context sets the context to be used in this call's Do method. Any 12968// pending HTTP request will be aborted if the provided context is 12969// canceled. 12970func (c *PropertiesUserLinksAuditCall) Context(ctx context.Context) *PropertiesUserLinksAuditCall { 12971 c.ctx_ = ctx 12972 return c 12973} 12974 12975// Header returns an http.Header that can be modified by the caller to 12976// add HTTP headers to the request. 12977func (c *PropertiesUserLinksAuditCall) Header() http.Header { 12978 if c.header_ == nil { 12979 c.header_ = make(http.Header) 12980 } 12981 return c.header_ 12982} 12983 12984func (c *PropertiesUserLinksAuditCall) doRequest(alt string) (*http.Response, error) { 12985 reqHeaders := make(http.Header) 12986 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 12987 for k, v := range c.header_ { 12988 reqHeaders[k] = v 12989 } 12990 reqHeaders.Set("User-Agent", c.s.userAgent()) 12991 var body io.Reader = nil 12992 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaaudituserlinksrequest) 12993 if err != nil { 12994 return nil, err 12995 } 12996 reqHeaders.Set("Content-Type", "application/json") 12997 c.urlParams_.Set("alt", alt) 12998 c.urlParams_.Set("prettyPrint", "false") 12999 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:audit") 13000 urls += "?" + c.urlParams_.Encode() 13001 req, err := http.NewRequest("POST", urls, body) 13002 if err != nil { 13003 return nil, err 13004 } 13005 req.Header = reqHeaders 13006 googleapi.Expand(req.URL, map[string]string{ 13007 "parent": c.parent, 13008 }) 13009 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13010} 13011 13012// Do executes the "analyticsadmin.properties.userLinks.audit" call. 13013// Exactly one of *GoogleAnalyticsAdminV1alphaAuditUserLinksResponse or 13014// error will be non-nil. Any non-2xx status code is an error. Response 13015// headers are in either 13016// *GoogleAnalyticsAdminV1alphaAuditUserLinksResponse.ServerResponse.Head 13017// er or (if a response was returned at all) in 13018// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13019// whether the returned error was because http.StatusNotModified was 13020// returned. 13021func (c *PropertiesUserLinksAuditCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAuditUserLinksResponse, error) { 13022 gensupport.SetOptions(c.urlParams_, opts...) 13023 res, err := c.doRequest("json") 13024 if res != nil && res.StatusCode == http.StatusNotModified { 13025 if res.Body != nil { 13026 res.Body.Close() 13027 } 13028 return nil, &googleapi.Error{ 13029 Code: res.StatusCode, 13030 Header: res.Header, 13031 } 13032 } 13033 if err != nil { 13034 return nil, err 13035 } 13036 defer googleapi.CloseBody(res) 13037 if err := googleapi.CheckResponse(res); err != nil { 13038 return nil, err 13039 } 13040 ret := &GoogleAnalyticsAdminV1alphaAuditUserLinksResponse{ 13041 ServerResponse: googleapi.ServerResponse{ 13042 Header: res.Header, 13043 HTTPStatusCode: res.StatusCode, 13044 }, 13045 } 13046 target := &ret 13047 if err := gensupport.DecodeResponse(target, res); err != nil { 13048 return nil, err 13049 } 13050 return ret, nil 13051 // { 13052 // "description": "Lists all user links on an account or property, including implicit ones that come from effective permissions granted by groups or organization admin roles. If a returned user link does not have direct permissions, they cannot be removed from the account or property directly with the DeleteUserLink command. They have to be removed from the group/etc that gives them permissions, which is currently only usable/discoverable in the GA or GMP UIs.", 13053 // "flatPath": "v1alpha/properties/{propertiesId}/userLinks:audit", 13054 // "httpMethod": "POST", 13055 // "id": "analyticsadmin.properties.userLinks.audit", 13056 // "parameterOrder": [ 13057 // "parent" 13058 // ], 13059 // "parameters": { 13060 // "parent": { 13061 // "description": "Required. Example format: accounts/1234", 13062 // "location": "path", 13063 // "pattern": "^properties/[^/]+$", 13064 // "required": true, 13065 // "type": "string" 13066 // } 13067 // }, 13068 // "path": "v1alpha/{+parent}/userLinks:audit", 13069 // "request": { 13070 // "$ref": "GoogleAnalyticsAdminV1alphaAuditUserLinksRequest" 13071 // }, 13072 // "response": { 13073 // "$ref": "GoogleAnalyticsAdminV1alphaAuditUserLinksResponse" 13074 // }, 13075 // "scopes": [ 13076 // "https://www.googleapis.com/auth/analytics.manage.users", 13077 // "https://www.googleapis.com/auth/analytics.manage.users.readonly" 13078 // ] 13079 // } 13080 13081} 13082 13083// Pages invokes f for each page of results. 13084// A non-nil error returned from f will halt the iteration. 13085// The provided context supersedes any context provided to the Context method. 13086func (c *PropertiesUserLinksAuditCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaAuditUserLinksResponse) error) error { 13087 c.ctx_ = ctx 13088 defer func(pt string) { c.googleanalyticsadminv1alphaaudituserlinksrequest.PageToken = pt }(c.googleanalyticsadminv1alphaaudituserlinksrequest.PageToken) // reset paging to original point 13089 for { 13090 x, err := c.Do() 13091 if err != nil { 13092 return err 13093 } 13094 if err := f(x); err != nil { 13095 return err 13096 } 13097 if x.NextPageToken == "" { 13098 return nil 13099 } 13100 c.googleanalyticsadminv1alphaaudituserlinksrequest.PageToken = x.NextPageToken 13101 } 13102} 13103 13104// method id "analyticsadmin.properties.userLinks.batchCreate": 13105 13106type PropertiesUserLinksBatchCreateCall struct { 13107 s *Service 13108 parent string 13109 googleanalyticsadminv1alphabatchcreateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest 13110 urlParams_ gensupport.URLParams 13111 ctx_ context.Context 13112 header_ http.Header 13113} 13114 13115// BatchCreate: Creates information about multiple users' links to an 13116// account or property. This method is transactional. If any UserLink 13117// cannot be created, none of the UserLinks will be created. 13118// 13119// - parent: The account or property that all user links in the request 13120// are for. This field is required. The parent field in the 13121// CreateUserLinkRequest messages must either be empty or match this 13122// field. Example format: accounts/1234. 13123func (r *PropertiesUserLinksService) BatchCreate(parent string, googleanalyticsadminv1alphabatchcreateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest) *PropertiesUserLinksBatchCreateCall { 13124 c := &PropertiesUserLinksBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13125 c.parent = parent 13126 c.googleanalyticsadminv1alphabatchcreateuserlinksrequest = googleanalyticsadminv1alphabatchcreateuserlinksrequest 13127 return c 13128} 13129 13130// Fields allows partial responses to be retrieved. See 13131// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13132// for more information. 13133func (c *PropertiesUserLinksBatchCreateCall) Fields(s ...googleapi.Field) *PropertiesUserLinksBatchCreateCall { 13134 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13135 return c 13136} 13137 13138// Context sets the context to be used in this call's Do method. Any 13139// pending HTTP request will be aborted if the provided context is 13140// canceled. 13141func (c *PropertiesUserLinksBatchCreateCall) Context(ctx context.Context) *PropertiesUserLinksBatchCreateCall { 13142 c.ctx_ = ctx 13143 return c 13144} 13145 13146// Header returns an http.Header that can be modified by the caller to 13147// add HTTP headers to the request. 13148func (c *PropertiesUserLinksBatchCreateCall) Header() http.Header { 13149 if c.header_ == nil { 13150 c.header_ = make(http.Header) 13151 } 13152 return c.header_ 13153} 13154 13155func (c *PropertiesUserLinksBatchCreateCall) doRequest(alt string) (*http.Response, error) { 13156 reqHeaders := make(http.Header) 13157 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 13158 for k, v := range c.header_ { 13159 reqHeaders[k] = v 13160 } 13161 reqHeaders.Set("User-Agent", c.s.userAgent()) 13162 var body io.Reader = nil 13163 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphabatchcreateuserlinksrequest) 13164 if err != nil { 13165 return nil, err 13166 } 13167 reqHeaders.Set("Content-Type", "application/json") 13168 c.urlParams_.Set("alt", alt) 13169 c.urlParams_.Set("prettyPrint", "false") 13170 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:batchCreate") 13171 urls += "?" + c.urlParams_.Encode() 13172 req, err := http.NewRequest("POST", urls, body) 13173 if err != nil { 13174 return nil, err 13175 } 13176 req.Header = reqHeaders 13177 googleapi.Expand(req.URL, map[string]string{ 13178 "parent": c.parent, 13179 }) 13180 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13181} 13182 13183// Do executes the "analyticsadmin.properties.userLinks.batchCreate" call. 13184// Exactly one of 13185// *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse or error 13186// will be non-nil. Any non-2xx status code is an error. Response 13187// headers are in either 13188// *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse.ServerRespons 13189// e.Header or (if a response was returned at all) in 13190// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13191// whether the returned error was because http.StatusNotModified was 13192// returned. 13193func (c *PropertiesUserLinksBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse, error) { 13194 gensupport.SetOptions(c.urlParams_, opts...) 13195 res, err := c.doRequest("json") 13196 if res != nil && res.StatusCode == http.StatusNotModified { 13197 if res.Body != nil { 13198 res.Body.Close() 13199 } 13200 return nil, &googleapi.Error{ 13201 Code: res.StatusCode, 13202 Header: res.Header, 13203 } 13204 } 13205 if err != nil { 13206 return nil, err 13207 } 13208 defer googleapi.CloseBody(res) 13209 if err := googleapi.CheckResponse(res); err != nil { 13210 return nil, err 13211 } 13212 ret := &GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse{ 13213 ServerResponse: googleapi.ServerResponse{ 13214 Header: res.Header, 13215 HTTPStatusCode: res.StatusCode, 13216 }, 13217 } 13218 target := &ret 13219 if err := gensupport.DecodeResponse(target, res); err != nil { 13220 return nil, err 13221 } 13222 return ret, nil 13223 // { 13224 // "description": "Creates information about multiple users' links to an account or property. This method is transactional. If any UserLink cannot be created, none of the UserLinks will be created.", 13225 // "flatPath": "v1alpha/properties/{propertiesId}/userLinks:batchCreate", 13226 // "httpMethod": "POST", 13227 // "id": "analyticsadmin.properties.userLinks.batchCreate", 13228 // "parameterOrder": [ 13229 // "parent" 13230 // ], 13231 // "parameters": { 13232 // "parent": { 13233 // "description": "Required. The account or property that all user links in the request are for. This field is required. The parent field in the CreateUserLinkRequest messages must either be empty or match this field. Example format: accounts/1234", 13234 // "location": "path", 13235 // "pattern": "^properties/[^/]+$", 13236 // "required": true, 13237 // "type": "string" 13238 // } 13239 // }, 13240 // "path": "v1alpha/{+parent}/userLinks:batchCreate", 13241 // "request": { 13242 // "$ref": "GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest" 13243 // }, 13244 // "response": { 13245 // "$ref": "GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse" 13246 // }, 13247 // "scopes": [ 13248 // "https://www.googleapis.com/auth/analytics.manage.users" 13249 // ] 13250 // } 13251 13252} 13253 13254// method id "analyticsadmin.properties.userLinks.batchDelete": 13255 13256type PropertiesUserLinksBatchDeleteCall struct { 13257 s *Service 13258 parent string 13259 googleanalyticsadminv1alphabatchdeleteuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest 13260 urlParams_ gensupport.URLParams 13261 ctx_ context.Context 13262 header_ http.Header 13263} 13264 13265// BatchDelete: Deletes information about multiple users' links to an 13266// account or property. 13267// 13268// - parent: The account or property that all user links in the request 13269// are for. The parent of all values for user link names to delete 13270// must match this field. Example format: accounts/1234. 13271func (r *PropertiesUserLinksService) BatchDelete(parent string, googleanalyticsadminv1alphabatchdeleteuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest) *PropertiesUserLinksBatchDeleteCall { 13272 c := &PropertiesUserLinksBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13273 c.parent = parent 13274 c.googleanalyticsadminv1alphabatchdeleteuserlinksrequest = googleanalyticsadminv1alphabatchdeleteuserlinksrequest 13275 return c 13276} 13277 13278// Fields allows partial responses to be retrieved. See 13279// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13280// for more information. 13281func (c *PropertiesUserLinksBatchDeleteCall) Fields(s ...googleapi.Field) *PropertiesUserLinksBatchDeleteCall { 13282 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13283 return c 13284} 13285 13286// Context sets the context to be used in this call's Do method. Any 13287// pending HTTP request will be aborted if the provided context is 13288// canceled. 13289func (c *PropertiesUserLinksBatchDeleteCall) Context(ctx context.Context) *PropertiesUserLinksBatchDeleteCall { 13290 c.ctx_ = ctx 13291 return c 13292} 13293 13294// Header returns an http.Header that can be modified by the caller to 13295// add HTTP headers to the request. 13296func (c *PropertiesUserLinksBatchDeleteCall) Header() http.Header { 13297 if c.header_ == nil { 13298 c.header_ = make(http.Header) 13299 } 13300 return c.header_ 13301} 13302 13303func (c *PropertiesUserLinksBatchDeleteCall) doRequest(alt string) (*http.Response, error) { 13304 reqHeaders := make(http.Header) 13305 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 13306 for k, v := range c.header_ { 13307 reqHeaders[k] = v 13308 } 13309 reqHeaders.Set("User-Agent", c.s.userAgent()) 13310 var body io.Reader = nil 13311 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphabatchdeleteuserlinksrequest) 13312 if err != nil { 13313 return nil, err 13314 } 13315 reqHeaders.Set("Content-Type", "application/json") 13316 c.urlParams_.Set("alt", alt) 13317 c.urlParams_.Set("prettyPrint", "false") 13318 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:batchDelete") 13319 urls += "?" + c.urlParams_.Encode() 13320 req, err := http.NewRequest("POST", urls, body) 13321 if err != nil { 13322 return nil, err 13323 } 13324 req.Header = reqHeaders 13325 googleapi.Expand(req.URL, map[string]string{ 13326 "parent": c.parent, 13327 }) 13328 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13329} 13330 13331// Do executes the "analyticsadmin.properties.userLinks.batchDelete" call. 13332// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 13333// non-2xx status code is an error. Response headers are in either 13334// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 13335// returned at all) in error.(*googleapi.Error).Header. Use 13336// googleapi.IsNotModified to check whether the returned error was 13337// because http.StatusNotModified was returned. 13338func (c *PropertiesUserLinksBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 13339 gensupport.SetOptions(c.urlParams_, opts...) 13340 res, err := c.doRequest("json") 13341 if res != nil && res.StatusCode == http.StatusNotModified { 13342 if res.Body != nil { 13343 res.Body.Close() 13344 } 13345 return nil, &googleapi.Error{ 13346 Code: res.StatusCode, 13347 Header: res.Header, 13348 } 13349 } 13350 if err != nil { 13351 return nil, err 13352 } 13353 defer googleapi.CloseBody(res) 13354 if err := googleapi.CheckResponse(res); err != nil { 13355 return nil, err 13356 } 13357 ret := &GoogleProtobufEmpty{ 13358 ServerResponse: googleapi.ServerResponse{ 13359 Header: res.Header, 13360 HTTPStatusCode: res.StatusCode, 13361 }, 13362 } 13363 target := &ret 13364 if err := gensupport.DecodeResponse(target, res); err != nil { 13365 return nil, err 13366 } 13367 return ret, nil 13368 // { 13369 // "description": "Deletes information about multiple users' links to an account or property.", 13370 // "flatPath": "v1alpha/properties/{propertiesId}/userLinks:batchDelete", 13371 // "httpMethod": "POST", 13372 // "id": "analyticsadmin.properties.userLinks.batchDelete", 13373 // "parameterOrder": [ 13374 // "parent" 13375 // ], 13376 // "parameters": { 13377 // "parent": { 13378 // "description": "Required. The account or property that all user links in the request are for. The parent of all values for user link names to delete must match this field. Example format: accounts/1234", 13379 // "location": "path", 13380 // "pattern": "^properties/[^/]+$", 13381 // "required": true, 13382 // "type": "string" 13383 // } 13384 // }, 13385 // "path": "v1alpha/{+parent}/userLinks:batchDelete", 13386 // "request": { 13387 // "$ref": "GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest" 13388 // }, 13389 // "response": { 13390 // "$ref": "GoogleProtobufEmpty" 13391 // }, 13392 // "scopes": [ 13393 // "https://www.googleapis.com/auth/analytics.manage.users" 13394 // ] 13395 // } 13396 13397} 13398 13399// method id "analyticsadmin.properties.userLinks.batchGet": 13400 13401type PropertiesUserLinksBatchGetCall struct { 13402 s *Service 13403 parent string 13404 urlParams_ gensupport.URLParams 13405 ifNoneMatch_ string 13406 ctx_ context.Context 13407 header_ http.Header 13408} 13409 13410// BatchGet: Gets information about multiple users' links to an account 13411// or property. 13412// 13413// - parent: The account or property that all user links in the request 13414// are for. The parent of all provided values for the 'names' field 13415// must match this field. Example format: accounts/1234. 13416func (r *PropertiesUserLinksService) BatchGet(parent string) *PropertiesUserLinksBatchGetCall { 13417 c := &PropertiesUserLinksBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13418 c.parent = parent 13419 return c 13420} 13421 13422// Names sets the optional parameter "names": Required. The names of the 13423// user links to retrieve. A maximum of 1000 user links can be retrieved 13424// in a batch. Format: accounts/{accountId}/userLinks/{userLinkId} 13425func (c *PropertiesUserLinksBatchGetCall) Names(names ...string) *PropertiesUserLinksBatchGetCall { 13426 c.urlParams_.SetMulti("names", append([]string{}, names...)) 13427 return c 13428} 13429 13430// Fields allows partial responses to be retrieved. See 13431// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13432// for more information. 13433func (c *PropertiesUserLinksBatchGetCall) Fields(s ...googleapi.Field) *PropertiesUserLinksBatchGetCall { 13434 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13435 return c 13436} 13437 13438// IfNoneMatch sets the optional parameter which makes the operation 13439// fail if the object's ETag matches the given value. This is useful for 13440// getting updates only after the object has changed since the last 13441// request. Use googleapi.IsNotModified to check whether the response 13442// error from Do is the result of In-None-Match. 13443func (c *PropertiesUserLinksBatchGetCall) IfNoneMatch(entityTag string) *PropertiesUserLinksBatchGetCall { 13444 c.ifNoneMatch_ = entityTag 13445 return c 13446} 13447 13448// Context sets the context to be used in this call's Do method. Any 13449// pending HTTP request will be aborted if the provided context is 13450// canceled. 13451func (c *PropertiesUserLinksBatchGetCall) Context(ctx context.Context) *PropertiesUserLinksBatchGetCall { 13452 c.ctx_ = ctx 13453 return c 13454} 13455 13456// Header returns an http.Header that can be modified by the caller to 13457// add HTTP headers to the request. 13458func (c *PropertiesUserLinksBatchGetCall) Header() http.Header { 13459 if c.header_ == nil { 13460 c.header_ = make(http.Header) 13461 } 13462 return c.header_ 13463} 13464 13465func (c *PropertiesUserLinksBatchGetCall) doRequest(alt string) (*http.Response, error) { 13466 reqHeaders := make(http.Header) 13467 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 13468 for k, v := range c.header_ { 13469 reqHeaders[k] = v 13470 } 13471 reqHeaders.Set("User-Agent", c.s.userAgent()) 13472 if c.ifNoneMatch_ != "" { 13473 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13474 } 13475 var body io.Reader = nil 13476 c.urlParams_.Set("alt", alt) 13477 c.urlParams_.Set("prettyPrint", "false") 13478 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:batchGet") 13479 urls += "?" + c.urlParams_.Encode() 13480 req, err := http.NewRequest("GET", urls, body) 13481 if err != nil { 13482 return nil, err 13483 } 13484 req.Header = reqHeaders 13485 googleapi.Expand(req.URL, map[string]string{ 13486 "parent": c.parent, 13487 }) 13488 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13489} 13490 13491// Do executes the "analyticsadmin.properties.userLinks.batchGet" call. 13492// Exactly one of *GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse 13493// or error will be non-nil. Any non-2xx status code is an error. 13494// Response headers are in either 13495// *GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse.ServerResponse.H 13496// eader or (if a response was returned at all) in 13497// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13498// whether the returned error was because http.StatusNotModified was 13499// returned. 13500func (c *PropertiesUserLinksBatchGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse, error) { 13501 gensupport.SetOptions(c.urlParams_, opts...) 13502 res, err := c.doRequest("json") 13503 if res != nil && res.StatusCode == http.StatusNotModified { 13504 if res.Body != nil { 13505 res.Body.Close() 13506 } 13507 return nil, &googleapi.Error{ 13508 Code: res.StatusCode, 13509 Header: res.Header, 13510 } 13511 } 13512 if err != nil { 13513 return nil, err 13514 } 13515 defer googleapi.CloseBody(res) 13516 if err := googleapi.CheckResponse(res); err != nil { 13517 return nil, err 13518 } 13519 ret := &GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse{ 13520 ServerResponse: googleapi.ServerResponse{ 13521 Header: res.Header, 13522 HTTPStatusCode: res.StatusCode, 13523 }, 13524 } 13525 target := &ret 13526 if err := gensupport.DecodeResponse(target, res); err != nil { 13527 return nil, err 13528 } 13529 return ret, nil 13530 // { 13531 // "description": "Gets information about multiple users' links to an account or property.", 13532 // "flatPath": "v1alpha/properties/{propertiesId}/userLinks:batchGet", 13533 // "httpMethod": "GET", 13534 // "id": "analyticsadmin.properties.userLinks.batchGet", 13535 // "parameterOrder": [ 13536 // "parent" 13537 // ], 13538 // "parameters": { 13539 // "names": { 13540 // "description": "Required. The names of the user links to retrieve. A maximum of 1000 user links can be retrieved in a batch. Format: accounts/{accountId}/userLinks/{userLinkId}", 13541 // "location": "query", 13542 // "repeated": true, 13543 // "type": "string" 13544 // }, 13545 // "parent": { 13546 // "description": "Required. The account or property that all user links in the request are for. The parent of all provided values for the 'names' field must match this field. Example format: accounts/1234", 13547 // "location": "path", 13548 // "pattern": "^properties/[^/]+$", 13549 // "required": true, 13550 // "type": "string" 13551 // } 13552 // }, 13553 // "path": "v1alpha/{+parent}/userLinks:batchGet", 13554 // "response": { 13555 // "$ref": "GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse" 13556 // }, 13557 // "scopes": [ 13558 // "https://www.googleapis.com/auth/analytics.manage.users", 13559 // "https://www.googleapis.com/auth/analytics.manage.users.readonly" 13560 // ] 13561 // } 13562 13563} 13564 13565// method id "analyticsadmin.properties.userLinks.batchUpdate": 13566 13567type PropertiesUserLinksBatchUpdateCall struct { 13568 s *Service 13569 parent string 13570 googleanalyticsadminv1alphabatchupdateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest 13571 urlParams_ gensupport.URLParams 13572 ctx_ context.Context 13573 header_ http.Header 13574} 13575 13576// BatchUpdate: Updates information about multiple users' links to an 13577// account or property. 13578// 13579// - parent: The account or property that all user links in the request 13580// are for. The parent field in the UpdateUserLinkRequest messages 13581// must either be empty or match this field. Example format: 13582// accounts/1234. 13583func (r *PropertiesUserLinksService) BatchUpdate(parent string, googleanalyticsadminv1alphabatchupdateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest) *PropertiesUserLinksBatchUpdateCall { 13584 c := &PropertiesUserLinksBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13585 c.parent = parent 13586 c.googleanalyticsadminv1alphabatchupdateuserlinksrequest = googleanalyticsadminv1alphabatchupdateuserlinksrequest 13587 return c 13588} 13589 13590// Fields allows partial responses to be retrieved. See 13591// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13592// for more information. 13593func (c *PropertiesUserLinksBatchUpdateCall) Fields(s ...googleapi.Field) *PropertiesUserLinksBatchUpdateCall { 13594 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13595 return c 13596} 13597 13598// Context sets the context to be used in this call's Do method. Any 13599// pending HTTP request will be aborted if the provided context is 13600// canceled. 13601func (c *PropertiesUserLinksBatchUpdateCall) Context(ctx context.Context) *PropertiesUserLinksBatchUpdateCall { 13602 c.ctx_ = ctx 13603 return c 13604} 13605 13606// Header returns an http.Header that can be modified by the caller to 13607// add HTTP headers to the request. 13608func (c *PropertiesUserLinksBatchUpdateCall) Header() http.Header { 13609 if c.header_ == nil { 13610 c.header_ = make(http.Header) 13611 } 13612 return c.header_ 13613} 13614 13615func (c *PropertiesUserLinksBatchUpdateCall) doRequest(alt string) (*http.Response, error) { 13616 reqHeaders := make(http.Header) 13617 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 13618 for k, v := range c.header_ { 13619 reqHeaders[k] = v 13620 } 13621 reqHeaders.Set("User-Agent", c.s.userAgent()) 13622 var body io.Reader = nil 13623 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphabatchupdateuserlinksrequest) 13624 if err != nil { 13625 return nil, err 13626 } 13627 reqHeaders.Set("Content-Type", "application/json") 13628 c.urlParams_.Set("alt", alt) 13629 c.urlParams_.Set("prettyPrint", "false") 13630 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:batchUpdate") 13631 urls += "?" + c.urlParams_.Encode() 13632 req, err := http.NewRequest("POST", urls, body) 13633 if err != nil { 13634 return nil, err 13635 } 13636 req.Header = reqHeaders 13637 googleapi.Expand(req.URL, map[string]string{ 13638 "parent": c.parent, 13639 }) 13640 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13641} 13642 13643// Do executes the "analyticsadmin.properties.userLinks.batchUpdate" call. 13644// Exactly one of 13645// *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse or error 13646// will be non-nil. Any non-2xx status code is an error. Response 13647// headers are in either 13648// *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse.ServerRespons 13649// e.Header or (if a response was returned at all) in 13650// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13651// whether the returned error was because http.StatusNotModified was 13652// returned. 13653func (c *PropertiesUserLinksBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse, error) { 13654 gensupport.SetOptions(c.urlParams_, opts...) 13655 res, err := c.doRequest("json") 13656 if res != nil && res.StatusCode == http.StatusNotModified { 13657 if res.Body != nil { 13658 res.Body.Close() 13659 } 13660 return nil, &googleapi.Error{ 13661 Code: res.StatusCode, 13662 Header: res.Header, 13663 } 13664 } 13665 if err != nil { 13666 return nil, err 13667 } 13668 defer googleapi.CloseBody(res) 13669 if err := googleapi.CheckResponse(res); err != nil { 13670 return nil, err 13671 } 13672 ret := &GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse{ 13673 ServerResponse: googleapi.ServerResponse{ 13674 Header: res.Header, 13675 HTTPStatusCode: res.StatusCode, 13676 }, 13677 } 13678 target := &ret 13679 if err := gensupport.DecodeResponse(target, res); err != nil { 13680 return nil, err 13681 } 13682 return ret, nil 13683 // { 13684 // "description": "Updates information about multiple users' links to an account or property.", 13685 // "flatPath": "v1alpha/properties/{propertiesId}/userLinks:batchUpdate", 13686 // "httpMethod": "POST", 13687 // "id": "analyticsadmin.properties.userLinks.batchUpdate", 13688 // "parameterOrder": [ 13689 // "parent" 13690 // ], 13691 // "parameters": { 13692 // "parent": { 13693 // "description": "Required. The account or property that all user links in the request are for. The parent field in the UpdateUserLinkRequest messages must either be empty or match this field. Example format: accounts/1234", 13694 // "location": "path", 13695 // "pattern": "^properties/[^/]+$", 13696 // "required": true, 13697 // "type": "string" 13698 // } 13699 // }, 13700 // "path": "v1alpha/{+parent}/userLinks:batchUpdate", 13701 // "request": { 13702 // "$ref": "GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest" 13703 // }, 13704 // "response": { 13705 // "$ref": "GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse" 13706 // }, 13707 // "scopes": [ 13708 // "https://www.googleapis.com/auth/analytics.manage.users" 13709 // ] 13710 // } 13711 13712} 13713 13714// method id "analyticsadmin.properties.userLinks.create": 13715 13716type PropertiesUserLinksCreateCall struct { 13717 s *Service 13718 parent string 13719 googleanalyticsadminv1alphauserlink *GoogleAnalyticsAdminV1alphaUserLink 13720 urlParams_ gensupport.URLParams 13721 ctx_ context.Context 13722 header_ http.Header 13723} 13724 13725// Create: Creates a user link on an account or property. If the user 13726// with the specified email already has permissions on the account or 13727// property, then the user's existing permissions will be unioned with 13728// the permissions specified in the new UserLink. 13729// 13730// - parent: Example format: accounts/1234. 13731func (r *PropertiesUserLinksService) Create(parent string, googleanalyticsadminv1alphauserlink *GoogleAnalyticsAdminV1alphaUserLink) *PropertiesUserLinksCreateCall { 13732 c := &PropertiesUserLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13733 c.parent = parent 13734 c.googleanalyticsadminv1alphauserlink = googleanalyticsadminv1alphauserlink 13735 return c 13736} 13737 13738// NotifyNewUser sets the optional parameter "notifyNewUser": If set, 13739// then email the new user notifying them that they've been granted 13740// permissions to the resource. 13741func (c *PropertiesUserLinksCreateCall) NotifyNewUser(notifyNewUser bool) *PropertiesUserLinksCreateCall { 13742 c.urlParams_.Set("notifyNewUser", fmt.Sprint(notifyNewUser)) 13743 return c 13744} 13745 13746// Fields allows partial responses to be retrieved. See 13747// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13748// for more information. 13749func (c *PropertiesUserLinksCreateCall) Fields(s ...googleapi.Field) *PropertiesUserLinksCreateCall { 13750 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13751 return c 13752} 13753 13754// Context sets the context to be used in this call's Do method. Any 13755// pending HTTP request will be aborted if the provided context is 13756// canceled. 13757func (c *PropertiesUserLinksCreateCall) Context(ctx context.Context) *PropertiesUserLinksCreateCall { 13758 c.ctx_ = ctx 13759 return c 13760} 13761 13762// Header returns an http.Header that can be modified by the caller to 13763// add HTTP headers to the request. 13764func (c *PropertiesUserLinksCreateCall) Header() http.Header { 13765 if c.header_ == nil { 13766 c.header_ = make(http.Header) 13767 } 13768 return c.header_ 13769} 13770 13771func (c *PropertiesUserLinksCreateCall) doRequest(alt string) (*http.Response, error) { 13772 reqHeaders := make(http.Header) 13773 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 13774 for k, v := range c.header_ { 13775 reqHeaders[k] = v 13776 } 13777 reqHeaders.Set("User-Agent", c.s.userAgent()) 13778 var body io.Reader = nil 13779 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphauserlink) 13780 if err != nil { 13781 return nil, err 13782 } 13783 reqHeaders.Set("Content-Type", "application/json") 13784 c.urlParams_.Set("alt", alt) 13785 c.urlParams_.Set("prettyPrint", "false") 13786 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks") 13787 urls += "?" + c.urlParams_.Encode() 13788 req, err := http.NewRequest("POST", urls, body) 13789 if err != nil { 13790 return nil, err 13791 } 13792 req.Header = reqHeaders 13793 googleapi.Expand(req.URL, map[string]string{ 13794 "parent": c.parent, 13795 }) 13796 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13797} 13798 13799// Do executes the "analyticsadmin.properties.userLinks.create" call. 13800// Exactly one of *GoogleAnalyticsAdminV1alphaUserLink or error will be 13801// non-nil. Any non-2xx status code is an error. Response headers are in 13802// either *GoogleAnalyticsAdminV1alphaUserLink.ServerResponse.Header or 13803// (if a response was returned at all) in 13804// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13805// whether the returned error was because http.StatusNotModified was 13806// returned. 13807func (c *PropertiesUserLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaUserLink, error) { 13808 gensupport.SetOptions(c.urlParams_, opts...) 13809 res, err := c.doRequest("json") 13810 if res != nil && res.StatusCode == http.StatusNotModified { 13811 if res.Body != nil { 13812 res.Body.Close() 13813 } 13814 return nil, &googleapi.Error{ 13815 Code: res.StatusCode, 13816 Header: res.Header, 13817 } 13818 } 13819 if err != nil { 13820 return nil, err 13821 } 13822 defer googleapi.CloseBody(res) 13823 if err := googleapi.CheckResponse(res); err != nil { 13824 return nil, err 13825 } 13826 ret := &GoogleAnalyticsAdminV1alphaUserLink{ 13827 ServerResponse: googleapi.ServerResponse{ 13828 Header: res.Header, 13829 HTTPStatusCode: res.StatusCode, 13830 }, 13831 } 13832 target := &ret 13833 if err := gensupport.DecodeResponse(target, res); err != nil { 13834 return nil, err 13835 } 13836 return ret, nil 13837 // { 13838 // "description": "Creates a user link on an account or property. If the user with the specified email already has permissions on the account or property, then the user's existing permissions will be unioned with the permissions specified in the new UserLink.", 13839 // "flatPath": "v1alpha/properties/{propertiesId}/userLinks", 13840 // "httpMethod": "POST", 13841 // "id": "analyticsadmin.properties.userLinks.create", 13842 // "parameterOrder": [ 13843 // "parent" 13844 // ], 13845 // "parameters": { 13846 // "notifyNewUser": { 13847 // "description": "Optional. If set, then email the new user notifying them that they've been granted permissions to the resource.", 13848 // "location": "query", 13849 // "type": "boolean" 13850 // }, 13851 // "parent": { 13852 // "description": "Required. Example format: accounts/1234", 13853 // "location": "path", 13854 // "pattern": "^properties/[^/]+$", 13855 // "required": true, 13856 // "type": "string" 13857 // } 13858 // }, 13859 // "path": "v1alpha/{+parent}/userLinks", 13860 // "request": { 13861 // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" 13862 // }, 13863 // "response": { 13864 // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" 13865 // }, 13866 // "scopes": [ 13867 // "https://www.googleapis.com/auth/analytics.manage.users" 13868 // ] 13869 // } 13870 13871} 13872 13873// method id "analyticsadmin.properties.userLinks.delete": 13874 13875type PropertiesUserLinksDeleteCall struct { 13876 s *Service 13877 name string 13878 urlParams_ gensupport.URLParams 13879 ctx_ context.Context 13880 header_ http.Header 13881} 13882 13883// Delete: Deletes a user link on an account or property. 13884// 13885// - name: Example format: accounts/1234/userLinks/5678. 13886func (r *PropertiesUserLinksService) Delete(name string) *PropertiesUserLinksDeleteCall { 13887 c := &PropertiesUserLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13888 c.name = name 13889 return c 13890} 13891 13892// Fields allows partial responses to be retrieved. See 13893// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13894// for more information. 13895func (c *PropertiesUserLinksDeleteCall) Fields(s ...googleapi.Field) *PropertiesUserLinksDeleteCall { 13896 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13897 return c 13898} 13899 13900// Context sets the context to be used in this call's Do method. Any 13901// pending HTTP request will be aborted if the provided context is 13902// canceled. 13903func (c *PropertiesUserLinksDeleteCall) Context(ctx context.Context) *PropertiesUserLinksDeleteCall { 13904 c.ctx_ = ctx 13905 return c 13906} 13907 13908// Header returns an http.Header that can be modified by the caller to 13909// add HTTP headers to the request. 13910func (c *PropertiesUserLinksDeleteCall) Header() http.Header { 13911 if c.header_ == nil { 13912 c.header_ = make(http.Header) 13913 } 13914 return c.header_ 13915} 13916 13917func (c *PropertiesUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) { 13918 reqHeaders := make(http.Header) 13919 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 13920 for k, v := range c.header_ { 13921 reqHeaders[k] = v 13922 } 13923 reqHeaders.Set("User-Agent", c.s.userAgent()) 13924 var body io.Reader = nil 13925 c.urlParams_.Set("alt", alt) 13926 c.urlParams_.Set("prettyPrint", "false") 13927 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 13928 urls += "?" + c.urlParams_.Encode() 13929 req, err := http.NewRequest("DELETE", urls, body) 13930 if err != nil { 13931 return nil, err 13932 } 13933 req.Header = reqHeaders 13934 googleapi.Expand(req.URL, map[string]string{ 13935 "name": c.name, 13936 }) 13937 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13938} 13939 13940// Do executes the "analyticsadmin.properties.userLinks.delete" call. 13941// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 13942// non-2xx status code is an error. Response headers are in either 13943// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 13944// returned at all) in error.(*googleapi.Error).Header. Use 13945// googleapi.IsNotModified to check whether the returned error was 13946// because http.StatusNotModified was returned. 13947func (c *PropertiesUserLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 13948 gensupport.SetOptions(c.urlParams_, opts...) 13949 res, err := c.doRequest("json") 13950 if res != nil && res.StatusCode == http.StatusNotModified { 13951 if res.Body != nil { 13952 res.Body.Close() 13953 } 13954 return nil, &googleapi.Error{ 13955 Code: res.StatusCode, 13956 Header: res.Header, 13957 } 13958 } 13959 if err != nil { 13960 return nil, err 13961 } 13962 defer googleapi.CloseBody(res) 13963 if err := googleapi.CheckResponse(res); err != nil { 13964 return nil, err 13965 } 13966 ret := &GoogleProtobufEmpty{ 13967 ServerResponse: googleapi.ServerResponse{ 13968 Header: res.Header, 13969 HTTPStatusCode: res.StatusCode, 13970 }, 13971 } 13972 target := &ret 13973 if err := gensupport.DecodeResponse(target, res); err != nil { 13974 return nil, err 13975 } 13976 return ret, nil 13977 // { 13978 // "description": "Deletes a user link on an account or property.", 13979 // "flatPath": "v1alpha/properties/{propertiesId}/userLinks/{userLinksId}", 13980 // "httpMethod": "DELETE", 13981 // "id": "analyticsadmin.properties.userLinks.delete", 13982 // "parameterOrder": [ 13983 // "name" 13984 // ], 13985 // "parameters": { 13986 // "name": { 13987 // "description": "Required. Example format: accounts/1234/userLinks/5678", 13988 // "location": "path", 13989 // "pattern": "^properties/[^/]+/userLinks/[^/]+$", 13990 // "required": true, 13991 // "type": "string" 13992 // } 13993 // }, 13994 // "path": "v1alpha/{+name}", 13995 // "response": { 13996 // "$ref": "GoogleProtobufEmpty" 13997 // }, 13998 // "scopes": [ 13999 // "https://www.googleapis.com/auth/analytics.manage.users" 14000 // ] 14001 // } 14002 14003} 14004 14005// method id "analyticsadmin.properties.userLinks.get": 14006 14007type PropertiesUserLinksGetCall struct { 14008 s *Service 14009 name string 14010 urlParams_ gensupport.URLParams 14011 ifNoneMatch_ string 14012 ctx_ context.Context 14013 header_ http.Header 14014} 14015 14016// Get: Gets information about a user's link to an account or property. 14017// 14018// - name: Example format: accounts/1234/userLinks/5678. 14019func (r *PropertiesUserLinksService) Get(name string) *PropertiesUserLinksGetCall { 14020 c := &PropertiesUserLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14021 c.name = name 14022 return c 14023} 14024 14025// Fields allows partial responses to be retrieved. See 14026// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14027// for more information. 14028func (c *PropertiesUserLinksGetCall) Fields(s ...googleapi.Field) *PropertiesUserLinksGetCall { 14029 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14030 return c 14031} 14032 14033// IfNoneMatch sets the optional parameter which makes the operation 14034// fail if the object's ETag matches the given value. This is useful for 14035// getting updates only after the object has changed since the last 14036// request. Use googleapi.IsNotModified to check whether the response 14037// error from Do is the result of In-None-Match. 14038func (c *PropertiesUserLinksGetCall) IfNoneMatch(entityTag string) *PropertiesUserLinksGetCall { 14039 c.ifNoneMatch_ = entityTag 14040 return c 14041} 14042 14043// Context sets the context to be used in this call's Do method. Any 14044// pending HTTP request will be aborted if the provided context is 14045// canceled. 14046func (c *PropertiesUserLinksGetCall) Context(ctx context.Context) *PropertiesUserLinksGetCall { 14047 c.ctx_ = ctx 14048 return c 14049} 14050 14051// Header returns an http.Header that can be modified by the caller to 14052// add HTTP headers to the request. 14053func (c *PropertiesUserLinksGetCall) Header() http.Header { 14054 if c.header_ == nil { 14055 c.header_ = make(http.Header) 14056 } 14057 return c.header_ 14058} 14059 14060func (c *PropertiesUserLinksGetCall) doRequest(alt string) (*http.Response, error) { 14061 reqHeaders := make(http.Header) 14062 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 14063 for k, v := range c.header_ { 14064 reqHeaders[k] = v 14065 } 14066 reqHeaders.Set("User-Agent", c.s.userAgent()) 14067 if c.ifNoneMatch_ != "" { 14068 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14069 } 14070 var body io.Reader = nil 14071 c.urlParams_.Set("alt", alt) 14072 c.urlParams_.Set("prettyPrint", "false") 14073 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 14074 urls += "?" + c.urlParams_.Encode() 14075 req, err := http.NewRequest("GET", urls, body) 14076 if err != nil { 14077 return nil, err 14078 } 14079 req.Header = reqHeaders 14080 googleapi.Expand(req.URL, map[string]string{ 14081 "name": c.name, 14082 }) 14083 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14084} 14085 14086// Do executes the "analyticsadmin.properties.userLinks.get" call. 14087// Exactly one of *GoogleAnalyticsAdminV1alphaUserLink or error will be 14088// non-nil. Any non-2xx status code is an error. Response headers are in 14089// either *GoogleAnalyticsAdminV1alphaUserLink.ServerResponse.Header or 14090// (if a response was returned at all) in 14091// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14092// whether the returned error was because http.StatusNotModified was 14093// returned. 14094func (c *PropertiesUserLinksGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaUserLink, error) { 14095 gensupport.SetOptions(c.urlParams_, opts...) 14096 res, err := c.doRequest("json") 14097 if res != nil && res.StatusCode == http.StatusNotModified { 14098 if res.Body != nil { 14099 res.Body.Close() 14100 } 14101 return nil, &googleapi.Error{ 14102 Code: res.StatusCode, 14103 Header: res.Header, 14104 } 14105 } 14106 if err != nil { 14107 return nil, err 14108 } 14109 defer googleapi.CloseBody(res) 14110 if err := googleapi.CheckResponse(res); err != nil { 14111 return nil, err 14112 } 14113 ret := &GoogleAnalyticsAdminV1alphaUserLink{ 14114 ServerResponse: googleapi.ServerResponse{ 14115 Header: res.Header, 14116 HTTPStatusCode: res.StatusCode, 14117 }, 14118 } 14119 target := &ret 14120 if err := gensupport.DecodeResponse(target, res); err != nil { 14121 return nil, err 14122 } 14123 return ret, nil 14124 // { 14125 // "description": "Gets information about a user's link to an account or property.", 14126 // "flatPath": "v1alpha/properties/{propertiesId}/userLinks/{userLinksId}", 14127 // "httpMethod": "GET", 14128 // "id": "analyticsadmin.properties.userLinks.get", 14129 // "parameterOrder": [ 14130 // "name" 14131 // ], 14132 // "parameters": { 14133 // "name": { 14134 // "description": "Required. Example format: accounts/1234/userLinks/5678", 14135 // "location": "path", 14136 // "pattern": "^properties/[^/]+/userLinks/[^/]+$", 14137 // "required": true, 14138 // "type": "string" 14139 // } 14140 // }, 14141 // "path": "v1alpha/{+name}", 14142 // "response": { 14143 // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" 14144 // }, 14145 // "scopes": [ 14146 // "https://www.googleapis.com/auth/analytics.manage.users", 14147 // "https://www.googleapis.com/auth/analytics.manage.users.readonly" 14148 // ] 14149 // } 14150 14151} 14152 14153// method id "analyticsadmin.properties.userLinks.list": 14154 14155type PropertiesUserLinksListCall struct { 14156 s *Service 14157 parent string 14158 urlParams_ gensupport.URLParams 14159 ifNoneMatch_ string 14160 ctx_ context.Context 14161 header_ http.Header 14162} 14163 14164// List: Lists all user links on an account or property. 14165// 14166// - parent: Example format: accounts/1234. 14167func (r *PropertiesUserLinksService) List(parent string) *PropertiesUserLinksListCall { 14168 c := &PropertiesUserLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14169 c.parent = parent 14170 return c 14171} 14172 14173// PageSize sets the optional parameter "pageSize": The maximum number 14174// of user links to return. The service may return fewer than this 14175// value. If unspecified, at most 200 user links will be returned. The 14176// maximum value is 500; values above 500 will be coerced to 500. 14177func (c *PropertiesUserLinksListCall) PageSize(pageSize int64) *PropertiesUserLinksListCall { 14178 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 14179 return c 14180} 14181 14182// PageToken sets the optional parameter "pageToken": A page token, 14183// received from a previous `ListUserLinks` call. Provide this to 14184// retrieve the subsequent page. When paginating, all other parameters 14185// provided to `ListUserLinks` must match the call that provided the 14186// page token. 14187func (c *PropertiesUserLinksListCall) PageToken(pageToken string) *PropertiesUserLinksListCall { 14188 c.urlParams_.Set("pageToken", pageToken) 14189 return c 14190} 14191 14192// Fields allows partial responses to be retrieved. See 14193// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14194// for more information. 14195func (c *PropertiesUserLinksListCall) Fields(s ...googleapi.Field) *PropertiesUserLinksListCall { 14196 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14197 return c 14198} 14199 14200// IfNoneMatch sets the optional parameter which makes the operation 14201// fail if the object's ETag matches the given value. This is useful for 14202// getting updates only after the object has changed since the last 14203// request. Use googleapi.IsNotModified to check whether the response 14204// error from Do is the result of In-None-Match. 14205func (c *PropertiesUserLinksListCall) IfNoneMatch(entityTag string) *PropertiesUserLinksListCall { 14206 c.ifNoneMatch_ = entityTag 14207 return c 14208} 14209 14210// Context sets the context to be used in this call's Do method. Any 14211// pending HTTP request will be aborted if the provided context is 14212// canceled. 14213func (c *PropertiesUserLinksListCall) Context(ctx context.Context) *PropertiesUserLinksListCall { 14214 c.ctx_ = ctx 14215 return c 14216} 14217 14218// Header returns an http.Header that can be modified by the caller to 14219// add HTTP headers to the request. 14220func (c *PropertiesUserLinksListCall) Header() http.Header { 14221 if c.header_ == nil { 14222 c.header_ = make(http.Header) 14223 } 14224 return c.header_ 14225} 14226 14227func (c *PropertiesUserLinksListCall) doRequest(alt string) (*http.Response, error) { 14228 reqHeaders := make(http.Header) 14229 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 14230 for k, v := range c.header_ { 14231 reqHeaders[k] = v 14232 } 14233 reqHeaders.Set("User-Agent", c.s.userAgent()) 14234 if c.ifNoneMatch_ != "" { 14235 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14236 } 14237 var body io.Reader = nil 14238 c.urlParams_.Set("alt", alt) 14239 c.urlParams_.Set("prettyPrint", "false") 14240 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks") 14241 urls += "?" + c.urlParams_.Encode() 14242 req, err := http.NewRequest("GET", urls, body) 14243 if err != nil { 14244 return nil, err 14245 } 14246 req.Header = reqHeaders 14247 googleapi.Expand(req.URL, map[string]string{ 14248 "parent": c.parent, 14249 }) 14250 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14251} 14252 14253// Do executes the "analyticsadmin.properties.userLinks.list" call. 14254// Exactly one of *GoogleAnalyticsAdminV1alphaListUserLinksResponse or 14255// error will be non-nil. Any non-2xx status code is an error. Response 14256// headers are in either 14257// *GoogleAnalyticsAdminV1alphaListUserLinksResponse.ServerResponse.Heade 14258// r or (if a response was returned at all) in 14259// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14260// whether the returned error was because http.StatusNotModified was 14261// returned. 14262func (c *PropertiesUserLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListUserLinksResponse, error) { 14263 gensupport.SetOptions(c.urlParams_, opts...) 14264 res, err := c.doRequest("json") 14265 if res != nil && res.StatusCode == http.StatusNotModified { 14266 if res.Body != nil { 14267 res.Body.Close() 14268 } 14269 return nil, &googleapi.Error{ 14270 Code: res.StatusCode, 14271 Header: res.Header, 14272 } 14273 } 14274 if err != nil { 14275 return nil, err 14276 } 14277 defer googleapi.CloseBody(res) 14278 if err := googleapi.CheckResponse(res); err != nil { 14279 return nil, err 14280 } 14281 ret := &GoogleAnalyticsAdminV1alphaListUserLinksResponse{ 14282 ServerResponse: googleapi.ServerResponse{ 14283 Header: res.Header, 14284 HTTPStatusCode: res.StatusCode, 14285 }, 14286 } 14287 target := &ret 14288 if err := gensupport.DecodeResponse(target, res); err != nil { 14289 return nil, err 14290 } 14291 return ret, nil 14292 // { 14293 // "description": "Lists all user links on an account or property.", 14294 // "flatPath": "v1alpha/properties/{propertiesId}/userLinks", 14295 // "httpMethod": "GET", 14296 // "id": "analyticsadmin.properties.userLinks.list", 14297 // "parameterOrder": [ 14298 // "parent" 14299 // ], 14300 // "parameters": { 14301 // "pageSize": { 14302 // "description": "The maximum number of user links to return. The service may return fewer than this value. If unspecified, at most 200 user links will be returned. The maximum value is 500; values above 500 will be coerced to 500.", 14303 // "format": "int32", 14304 // "location": "query", 14305 // "type": "integer" 14306 // }, 14307 // "pageToken": { 14308 // "description": "A page token, received from a previous `ListUserLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListUserLinks` must match the call that provided the page token.", 14309 // "location": "query", 14310 // "type": "string" 14311 // }, 14312 // "parent": { 14313 // "description": "Required. Example format: accounts/1234", 14314 // "location": "path", 14315 // "pattern": "^properties/[^/]+$", 14316 // "required": true, 14317 // "type": "string" 14318 // } 14319 // }, 14320 // "path": "v1alpha/{+parent}/userLinks", 14321 // "response": { 14322 // "$ref": "GoogleAnalyticsAdminV1alphaListUserLinksResponse" 14323 // }, 14324 // "scopes": [ 14325 // "https://www.googleapis.com/auth/analytics.manage.users", 14326 // "https://www.googleapis.com/auth/analytics.manage.users.readonly" 14327 // ] 14328 // } 14329 14330} 14331 14332// Pages invokes f for each page of results. 14333// A non-nil error returned from f will halt the iteration. 14334// The provided context supersedes any context provided to the Context method. 14335func (c *PropertiesUserLinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListUserLinksResponse) error) error { 14336 c.ctx_ = ctx 14337 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 14338 for { 14339 x, err := c.Do() 14340 if err != nil { 14341 return err 14342 } 14343 if err := f(x); err != nil { 14344 return err 14345 } 14346 if x.NextPageToken == "" { 14347 return nil 14348 } 14349 c.PageToken(x.NextPageToken) 14350 } 14351} 14352 14353// method id "analyticsadmin.properties.userLinks.patch": 14354 14355type PropertiesUserLinksPatchCall struct { 14356 s *Service 14357 name string 14358 googleanalyticsadminv1alphauserlink *GoogleAnalyticsAdminV1alphaUserLink 14359 urlParams_ gensupport.URLParams 14360 ctx_ context.Context 14361 header_ http.Header 14362} 14363 14364// Patch: Updates a user link on an account or property. 14365// 14366// - name: Output only. Example format: properties/1234/userLinks/5678. 14367func (r *PropertiesUserLinksService) Patch(name string, googleanalyticsadminv1alphauserlink *GoogleAnalyticsAdminV1alphaUserLink) *PropertiesUserLinksPatchCall { 14368 c := &PropertiesUserLinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14369 c.name = name 14370 c.googleanalyticsadminv1alphauserlink = googleanalyticsadminv1alphauserlink 14371 return c 14372} 14373 14374// Fields allows partial responses to be retrieved. See 14375// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14376// for more information. 14377func (c *PropertiesUserLinksPatchCall) Fields(s ...googleapi.Field) *PropertiesUserLinksPatchCall { 14378 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14379 return c 14380} 14381 14382// Context sets the context to be used in this call's Do method. Any 14383// pending HTTP request will be aborted if the provided context is 14384// canceled. 14385func (c *PropertiesUserLinksPatchCall) Context(ctx context.Context) *PropertiesUserLinksPatchCall { 14386 c.ctx_ = ctx 14387 return c 14388} 14389 14390// Header returns an http.Header that can be modified by the caller to 14391// add HTTP headers to the request. 14392func (c *PropertiesUserLinksPatchCall) Header() http.Header { 14393 if c.header_ == nil { 14394 c.header_ = make(http.Header) 14395 } 14396 return c.header_ 14397} 14398 14399func (c *PropertiesUserLinksPatchCall) doRequest(alt string) (*http.Response, error) { 14400 reqHeaders := make(http.Header) 14401 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 14402 for k, v := range c.header_ { 14403 reqHeaders[k] = v 14404 } 14405 reqHeaders.Set("User-Agent", c.s.userAgent()) 14406 var body io.Reader = nil 14407 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphauserlink) 14408 if err != nil { 14409 return nil, err 14410 } 14411 reqHeaders.Set("Content-Type", "application/json") 14412 c.urlParams_.Set("alt", alt) 14413 c.urlParams_.Set("prettyPrint", "false") 14414 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 14415 urls += "?" + c.urlParams_.Encode() 14416 req, err := http.NewRequest("PATCH", urls, body) 14417 if err != nil { 14418 return nil, err 14419 } 14420 req.Header = reqHeaders 14421 googleapi.Expand(req.URL, map[string]string{ 14422 "name": c.name, 14423 }) 14424 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14425} 14426 14427// Do executes the "analyticsadmin.properties.userLinks.patch" call. 14428// Exactly one of *GoogleAnalyticsAdminV1alphaUserLink or error will be 14429// non-nil. Any non-2xx status code is an error. Response headers are in 14430// either *GoogleAnalyticsAdminV1alphaUserLink.ServerResponse.Header or 14431// (if a response was returned at all) in 14432// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14433// whether the returned error was because http.StatusNotModified was 14434// returned. 14435func (c *PropertiesUserLinksPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaUserLink, error) { 14436 gensupport.SetOptions(c.urlParams_, opts...) 14437 res, err := c.doRequest("json") 14438 if res != nil && res.StatusCode == http.StatusNotModified { 14439 if res.Body != nil { 14440 res.Body.Close() 14441 } 14442 return nil, &googleapi.Error{ 14443 Code: res.StatusCode, 14444 Header: res.Header, 14445 } 14446 } 14447 if err != nil { 14448 return nil, err 14449 } 14450 defer googleapi.CloseBody(res) 14451 if err := googleapi.CheckResponse(res); err != nil { 14452 return nil, err 14453 } 14454 ret := &GoogleAnalyticsAdminV1alphaUserLink{ 14455 ServerResponse: googleapi.ServerResponse{ 14456 Header: res.Header, 14457 HTTPStatusCode: res.StatusCode, 14458 }, 14459 } 14460 target := &ret 14461 if err := gensupport.DecodeResponse(target, res); err != nil { 14462 return nil, err 14463 } 14464 return ret, nil 14465 // { 14466 // "description": "Updates a user link on an account or property.", 14467 // "flatPath": "v1alpha/properties/{propertiesId}/userLinks/{userLinksId}", 14468 // "httpMethod": "PATCH", 14469 // "id": "analyticsadmin.properties.userLinks.patch", 14470 // "parameterOrder": [ 14471 // "name" 14472 // ], 14473 // "parameters": { 14474 // "name": { 14475 // "description": "Output only. Example format: properties/1234/userLinks/5678", 14476 // "location": "path", 14477 // "pattern": "^properties/[^/]+/userLinks/[^/]+$", 14478 // "required": true, 14479 // "type": "string" 14480 // } 14481 // }, 14482 // "path": "v1alpha/{+name}", 14483 // "request": { 14484 // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" 14485 // }, 14486 // "response": { 14487 // "$ref": "GoogleAnalyticsAdminV1alphaUserLink" 14488 // }, 14489 // "scopes": [ 14490 // "https://www.googleapis.com/auth/analytics.manage.users" 14491 // ] 14492 // } 14493 14494} 14495 14496// method id "analyticsadmin.properties.webDataStreams.create": 14497 14498type PropertiesWebDataStreamsCreateCall struct { 14499 s *Service 14500 parent string 14501 googleanalyticsadminv1alphawebdatastream *GoogleAnalyticsAdminV1alphaWebDataStream 14502 urlParams_ gensupport.URLParams 14503 ctx_ context.Context 14504 header_ http.Header 14505} 14506 14507// Create: Creates a web stream with the specified location and 14508// attributes. 14509// 14510// - parent: The parent resource where this web data stream will be 14511// created. Format: properties/123. 14512func (r *PropertiesWebDataStreamsService) Create(parent string, googleanalyticsadminv1alphawebdatastream *GoogleAnalyticsAdminV1alphaWebDataStream) *PropertiesWebDataStreamsCreateCall { 14513 c := &PropertiesWebDataStreamsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14514 c.parent = parent 14515 c.googleanalyticsadminv1alphawebdatastream = googleanalyticsadminv1alphawebdatastream 14516 return c 14517} 14518 14519// Fields allows partial responses to be retrieved. See 14520// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14521// for more information. 14522func (c *PropertiesWebDataStreamsCreateCall) Fields(s ...googleapi.Field) *PropertiesWebDataStreamsCreateCall { 14523 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14524 return c 14525} 14526 14527// Context sets the context to be used in this call's Do method. Any 14528// pending HTTP request will be aborted if the provided context is 14529// canceled. 14530func (c *PropertiesWebDataStreamsCreateCall) Context(ctx context.Context) *PropertiesWebDataStreamsCreateCall { 14531 c.ctx_ = ctx 14532 return c 14533} 14534 14535// Header returns an http.Header that can be modified by the caller to 14536// add HTTP headers to the request. 14537func (c *PropertiesWebDataStreamsCreateCall) Header() http.Header { 14538 if c.header_ == nil { 14539 c.header_ = make(http.Header) 14540 } 14541 return c.header_ 14542} 14543 14544func (c *PropertiesWebDataStreamsCreateCall) doRequest(alt string) (*http.Response, error) { 14545 reqHeaders := make(http.Header) 14546 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 14547 for k, v := range c.header_ { 14548 reqHeaders[k] = v 14549 } 14550 reqHeaders.Set("User-Agent", c.s.userAgent()) 14551 var body io.Reader = nil 14552 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphawebdatastream) 14553 if err != nil { 14554 return nil, err 14555 } 14556 reqHeaders.Set("Content-Type", "application/json") 14557 c.urlParams_.Set("alt", alt) 14558 c.urlParams_.Set("prettyPrint", "false") 14559 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/webDataStreams") 14560 urls += "?" + c.urlParams_.Encode() 14561 req, err := http.NewRequest("POST", urls, body) 14562 if err != nil { 14563 return nil, err 14564 } 14565 req.Header = reqHeaders 14566 googleapi.Expand(req.URL, map[string]string{ 14567 "parent": c.parent, 14568 }) 14569 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14570} 14571 14572// Do executes the "analyticsadmin.properties.webDataStreams.create" call. 14573// Exactly one of *GoogleAnalyticsAdminV1alphaWebDataStream or error 14574// will be non-nil. Any non-2xx status code is an error. Response 14575// headers are in either 14576// *GoogleAnalyticsAdminV1alphaWebDataStream.ServerResponse.Header or 14577// (if a response was returned at all) in 14578// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14579// whether the returned error was because http.StatusNotModified was 14580// returned. 14581func (c *PropertiesWebDataStreamsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaWebDataStream, error) { 14582 gensupport.SetOptions(c.urlParams_, opts...) 14583 res, err := c.doRequest("json") 14584 if res != nil && res.StatusCode == http.StatusNotModified { 14585 if res.Body != nil { 14586 res.Body.Close() 14587 } 14588 return nil, &googleapi.Error{ 14589 Code: res.StatusCode, 14590 Header: res.Header, 14591 } 14592 } 14593 if err != nil { 14594 return nil, err 14595 } 14596 defer googleapi.CloseBody(res) 14597 if err := googleapi.CheckResponse(res); err != nil { 14598 return nil, err 14599 } 14600 ret := &GoogleAnalyticsAdminV1alphaWebDataStream{ 14601 ServerResponse: googleapi.ServerResponse{ 14602 Header: res.Header, 14603 HTTPStatusCode: res.StatusCode, 14604 }, 14605 } 14606 target := &ret 14607 if err := gensupport.DecodeResponse(target, res); err != nil { 14608 return nil, err 14609 } 14610 return ret, nil 14611 // { 14612 // "description": "Creates a web stream with the specified location and attributes.", 14613 // "flatPath": "v1alpha/properties/{propertiesId}/webDataStreams", 14614 // "httpMethod": "POST", 14615 // "id": "analyticsadmin.properties.webDataStreams.create", 14616 // "parameterOrder": [ 14617 // "parent" 14618 // ], 14619 // "parameters": { 14620 // "parent": { 14621 // "description": "Required. The parent resource where this web data stream will be created. Format: properties/123", 14622 // "location": "path", 14623 // "pattern": "^properties/[^/]+$", 14624 // "required": true, 14625 // "type": "string" 14626 // } 14627 // }, 14628 // "path": "v1alpha/{+parent}/webDataStreams", 14629 // "request": { 14630 // "$ref": "GoogleAnalyticsAdminV1alphaWebDataStream" 14631 // }, 14632 // "response": { 14633 // "$ref": "GoogleAnalyticsAdminV1alphaWebDataStream" 14634 // }, 14635 // "scopes": [ 14636 // "https://www.googleapis.com/auth/analytics.edit" 14637 // ] 14638 // } 14639 14640} 14641 14642// method id "analyticsadmin.properties.webDataStreams.delete": 14643 14644type PropertiesWebDataStreamsDeleteCall struct { 14645 s *Service 14646 name string 14647 urlParams_ gensupport.URLParams 14648 ctx_ context.Context 14649 header_ http.Header 14650} 14651 14652// Delete: Deletes a web stream on a property. 14653// 14654// - name: The name of the web data stream to delete. Format: 14655// properties/{property_id}/webDataStreams/{stream_id} Example: 14656// "properties/123/webDataStreams/456". 14657func (r *PropertiesWebDataStreamsService) Delete(name string) *PropertiesWebDataStreamsDeleteCall { 14658 c := &PropertiesWebDataStreamsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14659 c.name = name 14660 return c 14661} 14662 14663// Fields allows partial responses to be retrieved. See 14664// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14665// for more information. 14666func (c *PropertiesWebDataStreamsDeleteCall) Fields(s ...googleapi.Field) *PropertiesWebDataStreamsDeleteCall { 14667 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14668 return c 14669} 14670 14671// Context sets the context to be used in this call's Do method. Any 14672// pending HTTP request will be aborted if the provided context is 14673// canceled. 14674func (c *PropertiesWebDataStreamsDeleteCall) Context(ctx context.Context) *PropertiesWebDataStreamsDeleteCall { 14675 c.ctx_ = ctx 14676 return c 14677} 14678 14679// Header returns an http.Header that can be modified by the caller to 14680// add HTTP headers to the request. 14681func (c *PropertiesWebDataStreamsDeleteCall) Header() http.Header { 14682 if c.header_ == nil { 14683 c.header_ = make(http.Header) 14684 } 14685 return c.header_ 14686} 14687 14688func (c *PropertiesWebDataStreamsDeleteCall) doRequest(alt string) (*http.Response, error) { 14689 reqHeaders := make(http.Header) 14690 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 14691 for k, v := range c.header_ { 14692 reqHeaders[k] = v 14693 } 14694 reqHeaders.Set("User-Agent", c.s.userAgent()) 14695 var body io.Reader = nil 14696 c.urlParams_.Set("alt", alt) 14697 c.urlParams_.Set("prettyPrint", "false") 14698 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 14699 urls += "?" + c.urlParams_.Encode() 14700 req, err := http.NewRequest("DELETE", urls, body) 14701 if err != nil { 14702 return nil, err 14703 } 14704 req.Header = reqHeaders 14705 googleapi.Expand(req.URL, map[string]string{ 14706 "name": c.name, 14707 }) 14708 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14709} 14710 14711// Do executes the "analyticsadmin.properties.webDataStreams.delete" call. 14712// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 14713// non-2xx status code is an error. Response headers are in either 14714// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 14715// returned at all) in error.(*googleapi.Error).Header. Use 14716// googleapi.IsNotModified to check whether the returned error was 14717// because http.StatusNotModified was returned. 14718func (c *PropertiesWebDataStreamsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 14719 gensupport.SetOptions(c.urlParams_, opts...) 14720 res, err := c.doRequest("json") 14721 if res != nil && res.StatusCode == http.StatusNotModified { 14722 if res.Body != nil { 14723 res.Body.Close() 14724 } 14725 return nil, &googleapi.Error{ 14726 Code: res.StatusCode, 14727 Header: res.Header, 14728 } 14729 } 14730 if err != nil { 14731 return nil, err 14732 } 14733 defer googleapi.CloseBody(res) 14734 if err := googleapi.CheckResponse(res); err != nil { 14735 return nil, err 14736 } 14737 ret := &GoogleProtobufEmpty{ 14738 ServerResponse: googleapi.ServerResponse{ 14739 Header: res.Header, 14740 HTTPStatusCode: res.StatusCode, 14741 }, 14742 } 14743 target := &ret 14744 if err := gensupport.DecodeResponse(target, res); err != nil { 14745 return nil, err 14746 } 14747 return ret, nil 14748 // { 14749 // "description": "Deletes a web stream on a property.", 14750 // "flatPath": "v1alpha/properties/{propertiesId}/webDataStreams/{webDataStreamsId}", 14751 // "httpMethod": "DELETE", 14752 // "id": "analyticsadmin.properties.webDataStreams.delete", 14753 // "parameterOrder": [ 14754 // "name" 14755 // ], 14756 // "parameters": { 14757 // "name": { 14758 // "description": "Required. The name of the web data stream to delete. Format: properties/{property_id}/webDataStreams/{stream_id} Example: \"properties/123/webDataStreams/456\"", 14759 // "location": "path", 14760 // "pattern": "^properties/[^/]+/webDataStreams/[^/]+$", 14761 // "required": true, 14762 // "type": "string" 14763 // } 14764 // }, 14765 // "path": "v1alpha/{+name}", 14766 // "response": { 14767 // "$ref": "GoogleProtobufEmpty" 14768 // }, 14769 // "scopes": [ 14770 // "https://www.googleapis.com/auth/analytics.edit" 14771 // ] 14772 // } 14773 14774} 14775 14776// method id "analyticsadmin.properties.webDataStreams.get": 14777 14778type PropertiesWebDataStreamsGetCall struct { 14779 s *Service 14780 name string 14781 urlParams_ gensupport.URLParams 14782 ifNoneMatch_ string 14783 ctx_ context.Context 14784 header_ http.Header 14785} 14786 14787// Get: Lookup for a single WebDataStream 14788// 14789// - name: The name of the web data stream to lookup. Format: 14790// properties/{property_id}/webDataStreams/{stream_id} Example: 14791// "properties/123/webDataStreams/456". 14792func (r *PropertiesWebDataStreamsService) Get(name string) *PropertiesWebDataStreamsGetCall { 14793 c := &PropertiesWebDataStreamsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14794 c.name = name 14795 return c 14796} 14797 14798// Fields allows partial responses to be retrieved. See 14799// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14800// for more information. 14801func (c *PropertiesWebDataStreamsGetCall) Fields(s ...googleapi.Field) *PropertiesWebDataStreamsGetCall { 14802 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14803 return c 14804} 14805 14806// IfNoneMatch sets the optional parameter which makes the operation 14807// fail if the object's ETag matches the given value. This is useful for 14808// getting updates only after the object has changed since the last 14809// request. Use googleapi.IsNotModified to check whether the response 14810// error from Do is the result of In-None-Match. 14811func (c *PropertiesWebDataStreamsGetCall) IfNoneMatch(entityTag string) *PropertiesWebDataStreamsGetCall { 14812 c.ifNoneMatch_ = entityTag 14813 return c 14814} 14815 14816// Context sets the context to be used in this call's Do method. Any 14817// pending HTTP request will be aborted if the provided context is 14818// canceled. 14819func (c *PropertiesWebDataStreamsGetCall) Context(ctx context.Context) *PropertiesWebDataStreamsGetCall { 14820 c.ctx_ = ctx 14821 return c 14822} 14823 14824// Header returns an http.Header that can be modified by the caller to 14825// add HTTP headers to the request. 14826func (c *PropertiesWebDataStreamsGetCall) Header() http.Header { 14827 if c.header_ == nil { 14828 c.header_ = make(http.Header) 14829 } 14830 return c.header_ 14831} 14832 14833func (c *PropertiesWebDataStreamsGetCall) doRequest(alt string) (*http.Response, error) { 14834 reqHeaders := make(http.Header) 14835 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 14836 for k, v := range c.header_ { 14837 reqHeaders[k] = v 14838 } 14839 reqHeaders.Set("User-Agent", c.s.userAgent()) 14840 if c.ifNoneMatch_ != "" { 14841 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14842 } 14843 var body io.Reader = nil 14844 c.urlParams_.Set("alt", alt) 14845 c.urlParams_.Set("prettyPrint", "false") 14846 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 14847 urls += "?" + c.urlParams_.Encode() 14848 req, err := http.NewRequest("GET", urls, body) 14849 if err != nil { 14850 return nil, err 14851 } 14852 req.Header = reqHeaders 14853 googleapi.Expand(req.URL, map[string]string{ 14854 "name": c.name, 14855 }) 14856 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14857} 14858 14859// Do executes the "analyticsadmin.properties.webDataStreams.get" call. 14860// Exactly one of *GoogleAnalyticsAdminV1alphaWebDataStream or error 14861// will be non-nil. Any non-2xx status code is an error. Response 14862// headers are in either 14863// *GoogleAnalyticsAdminV1alphaWebDataStream.ServerResponse.Header or 14864// (if a response was returned at all) in 14865// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14866// whether the returned error was because http.StatusNotModified was 14867// returned. 14868func (c *PropertiesWebDataStreamsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaWebDataStream, error) { 14869 gensupport.SetOptions(c.urlParams_, opts...) 14870 res, err := c.doRequest("json") 14871 if res != nil && res.StatusCode == http.StatusNotModified { 14872 if res.Body != nil { 14873 res.Body.Close() 14874 } 14875 return nil, &googleapi.Error{ 14876 Code: res.StatusCode, 14877 Header: res.Header, 14878 } 14879 } 14880 if err != nil { 14881 return nil, err 14882 } 14883 defer googleapi.CloseBody(res) 14884 if err := googleapi.CheckResponse(res); err != nil { 14885 return nil, err 14886 } 14887 ret := &GoogleAnalyticsAdminV1alphaWebDataStream{ 14888 ServerResponse: googleapi.ServerResponse{ 14889 Header: res.Header, 14890 HTTPStatusCode: res.StatusCode, 14891 }, 14892 } 14893 target := &ret 14894 if err := gensupport.DecodeResponse(target, res); err != nil { 14895 return nil, err 14896 } 14897 return ret, nil 14898 // { 14899 // "description": "Lookup for a single WebDataStream", 14900 // "flatPath": "v1alpha/properties/{propertiesId}/webDataStreams/{webDataStreamsId}", 14901 // "httpMethod": "GET", 14902 // "id": "analyticsadmin.properties.webDataStreams.get", 14903 // "parameterOrder": [ 14904 // "name" 14905 // ], 14906 // "parameters": { 14907 // "name": { 14908 // "description": "Required. The name of the web data stream to lookup. Format: properties/{property_id}/webDataStreams/{stream_id} Example: \"properties/123/webDataStreams/456\"", 14909 // "location": "path", 14910 // "pattern": "^properties/[^/]+/webDataStreams/[^/]+$", 14911 // "required": true, 14912 // "type": "string" 14913 // } 14914 // }, 14915 // "path": "v1alpha/{+name}", 14916 // "response": { 14917 // "$ref": "GoogleAnalyticsAdminV1alphaWebDataStream" 14918 // }, 14919 // "scopes": [ 14920 // "https://www.googleapis.com/auth/analytics.edit", 14921 // "https://www.googleapis.com/auth/analytics.readonly" 14922 // ] 14923 // } 14924 14925} 14926 14927// method id "analyticsadmin.properties.webDataStreams.getEnhancedMeasurementSettings": 14928 14929type PropertiesWebDataStreamsGetEnhancedMeasurementSettingsCall struct { 14930 s *Service 14931 name string 14932 urlParams_ gensupport.URLParams 14933 ifNoneMatch_ string 14934 ctx_ context.Context 14935 header_ http.Header 14936} 14937 14938// GetEnhancedMeasurementSettings: Returns the singleton enhanced 14939// measurement settings for this web stream. Note that the stream must 14940// enable enhanced measurement for these settings to take effect. 14941// 14942// - name: The name of the settings to lookup. Format: 14943// properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurem 14944// entSettings Example: 14945// "properties/1000/webDataStreams/2000/enhancedMeasurementSettings". 14946func (r *PropertiesWebDataStreamsService) GetEnhancedMeasurementSettings(name string) *PropertiesWebDataStreamsGetEnhancedMeasurementSettingsCall { 14947 c := &PropertiesWebDataStreamsGetEnhancedMeasurementSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14948 c.name = name 14949 return c 14950} 14951 14952// Fields allows partial responses to be retrieved. See 14953// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14954// for more information. 14955func (c *PropertiesWebDataStreamsGetEnhancedMeasurementSettingsCall) Fields(s ...googleapi.Field) *PropertiesWebDataStreamsGetEnhancedMeasurementSettingsCall { 14956 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14957 return c 14958} 14959 14960// IfNoneMatch sets the optional parameter which makes the operation 14961// fail if the object's ETag matches the given value. This is useful for 14962// getting updates only after the object has changed since the last 14963// request. Use googleapi.IsNotModified to check whether the response 14964// error from Do is the result of In-None-Match. 14965func (c *PropertiesWebDataStreamsGetEnhancedMeasurementSettingsCall) IfNoneMatch(entityTag string) *PropertiesWebDataStreamsGetEnhancedMeasurementSettingsCall { 14966 c.ifNoneMatch_ = entityTag 14967 return c 14968} 14969 14970// Context sets the context to be used in this call's Do method. Any 14971// pending HTTP request will be aborted if the provided context is 14972// canceled. 14973func (c *PropertiesWebDataStreamsGetEnhancedMeasurementSettingsCall) Context(ctx context.Context) *PropertiesWebDataStreamsGetEnhancedMeasurementSettingsCall { 14974 c.ctx_ = ctx 14975 return c 14976} 14977 14978// Header returns an http.Header that can be modified by the caller to 14979// add HTTP headers to the request. 14980func (c *PropertiesWebDataStreamsGetEnhancedMeasurementSettingsCall) Header() http.Header { 14981 if c.header_ == nil { 14982 c.header_ = make(http.Header) 14983 } 14984 return c.header_ 14985} 14986 14987func (c *PropertiesWebDataStreamsGetEnhancedMeasurementSettingsCall) doRequest(alt string) (*http.Response, error) { 14988 reqHeaders := make(http.Header) 14989 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 14990 for k, v := range c.header_ { 14991 reqHeaders[k] = v 14992 } 14993 reqHeaders.Set("User-Agent", c.s.userAgent()) 14994 if c.ifNoneMatch_ != "" { 14995 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14996 } 14997 var body io.Reader = nil 14998 c.urlParams_.Set("alt", alt) 14999 c.urlParams_.Set("prettyPrint", "false") 15000 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 15001 urls += "?" + c.urlParams_.Encode() 15002 req, err := http.NewRequest("GET", urls, body) 15003 if err != nil { 15004 return nil, err 15005 } 15006 req.Header = reqHeaders 15007 googleapi.Expand(req.URL, map[string]string{ 15008 "name": c.name, 15009 }) 15010 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15011} 15012 15013// Do executes the "analyticsadmin.properties.webDataStreams.getEnhancedMeasurementSettings" call. 15014// Exactly one of 15015// *GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings or error will 15016// be non-nil. Any non-2xx status code is an error. Response headers are 15017// in either 15018// *GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings.ServerResponse 15019// .Header or (if a response was returned at all) in 15020// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15021// whether the returned error was because http.StatusNotModified was 15022// returned. 15023func (c *PropertiesWebDataStreamsGetEnhancedMeasurementSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings, error) { 15024 gensupport.SetOptions(c.urlParams_, opts...) 15025 res, err := c.doRequest("json") 15026 if res != nil && res.StatusCode == http.StatusNotModified { 15027 if res.Body != nil { 15028 res.Body.Close() 15029 } 15030 return nil, &googleapi.Error{ 15031 Code: res.StatusCode, 15032 Header: res.Header, 15033 } 15034 } 15035 if err != nil { 15036 return nil, err 15037 } 15038 defer googleapi.CloseBody(res) 15039 if err := googleapi.CheckResponse(res); err != nil { 15040 return nil, err 15041 } 15042 ret := &GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings{ 15043 ServerResponse: googleapi.ServerResponse{ 15044 Header: res.Header, 15045 HTTPStatusCode: res.StatusCode, 15046 }, 15047 } 15048 target := &ret 15049 if err := gensupport.DecodeResponse(target, res); err != nil { 15050 return nil, err 15051 } 15052 return ret, nil 15053 // { 15054 // "description": "Returns the singleton enhanced measurement settings for this web stream. Note that the stream must enable enhanced measurement for these settings to take effect.", 15055 // "flatPath": "v1alpha/properties/{propertiesId}/webDataStreams/{webDataStreamsId}/enhancedMeasurementSettings", 15056 // "httpMethod": "GET", 15057 // "id": "analyticsadmin.properties.webDataStreams.getEnhancedMeasurementSettings", 15058 // "parameterOrder": [ 15059 // "name" 15060 // ], 15061 // "parameters": { 15062 // "name": { 15063 // "description": "Required. The name of the settings to lookup. Format: properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings Example: \"properties/1000/webDataStreams/2000/enhancedMeasurementSettings\"", 15064 // "location": "path", 15065 // "pattern": "^properties/[^/]+/webDataStreams/[^/]+/enhancedMeasurementSettings$", 15066 // "required": true, 15067 // "type": "string" 15068 // } 15069 // }, 15070 // "path": "v1alpha/{+name}", 15071 // "response": { 15072 // "$ref": "GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings" 15073 // }, 15074 // "scopes": [ 15075 // "https://www.googleapis.com/auth/analytics.edit", 15076 // "https://www.googleapis.com/auth/analytics.readonly" 15077 // ] 15078 // } 15079 15080} 15081 15082// method id "analyticsadmin.properties.webDataStreams.getGlobalSiteTag": 15083 15084type PropertiesWebDataStreamsGetGlobalSiteTagCall struct { 15085 s *Service 15086 name string 15087 urlParams_ gensupport.URLParams 15088 ifNoneMatch_ string 15089 ctx_ context.Context 15090 header_ http.Header 15091} 15092 15093// GetGlobalSiteTag: Returns the Site Tag for the specified web stream. 15094// Site Tags are immutable singletons. 15095// 15096// - name: The name of the site tag to lookup. Note that site tags are 15097// singletons and do not have unique IDs. Format: 15098// properties/{property_id}/webDataStreams/{stream_id}/globalSiteTag 15099// Example: "properties/123/webDataStreams/456/globalSiteTag". 15100func (r *PropertiesWebDataStreamsService) GetGlobalSiteTag(name string) *PropertiesWebDataStreamsGetGlobalSiteTagCall { 15101 c := &PropertiesWebDataStreamsGetGlobalSiteTagCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15102 c.name = name 15103 return c 15104} 15105 15106// Fields allows partial responses to be retrieved. See 15107// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15108// for more information. 15109func (c *PropertiesWebDataStreamsGetGlobalSiteTagCall) Fields(s ...googleapi.Field) *PropertiesWebDataStreamsGetGlobalSiteTagCall { 15110 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15111 return c 15112} 15113 15114// IfNoneMatch sets the optional parameter which makes the operation 15115// fail if the object's ETag matches the given value. This is useful for 15116// getting updates only after the object has changed since the last 15117// request. Use googleapi.IsNotModified to check whether the response 15118// error from Do is the result of In-None-Match. 15119func (c *PropertiesWebDataStreamsGetGlobalSiteTagCall) IfNoneMatch(entityTag string) *PropertiesWebDataStreamsGetGlobalSiteTagCall { 15120 c.ifNoneMatch_ = entityTag 15121 return c 15122} 15123 15124// Context sets the context to be used in this call's Do method. Any 15125// pending HTTP request will be aborted if the provided context is 15126// canceled. 15127func (c *PropertiesWebDataStreamsGetGlobalSiteTagCall) Context(ctx context.Context) *PropertiesWebDataStreamsGetGlobalSiteTagCall { 15128 c.ctx_ = ctx 15129 return c 15130} 15131 15132// Header returns an http.Header that can be modified by the caller to 15133// add HTTP headers to the request. 15134func (c *PropertiesWebDataStreamsGetGlobalSiteTagCall) Header() http.Header { 15135 if c.header_ == nil { 15136 c.header_ = make(http.Header) 15137 } 15138 return c.header_ 15139} 15140 15141func (c *PropertiesWebDataStreamsGetGlobalSiteTagCall) doRequest(alt string) (*http.Response, error) { 15142 reqHeaders := make(http.Header) 15143 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 15144 for k, v := range c.header_ { 15145 reqHeaders[k] = v 15146 } 15147 reqHeaders.Set("User-Agent", c.s.userAgent()) 15148 if c.ifNoneMatch_ != "" { 15149 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15150 } 15151 var body io.Reader = nil 15152 c.urlParams_.Set("alt", alt) 15153 c.urlParams_.Set("prettyPrint", "false") 15154 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 15155 urls += "?" + c.urlParams_.Encode() 15156 req, err := http.NewRequest("GET", urls, body) 15157 if err != nil { 15158 return nil, err 15159 } 15160 req.Header = reqHeaders 15161 googleapi.Expand(req.URL, map[string]string{ 15162 "name": c.name, 15163 }) 15164 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15165} 15166 15167// Do executes the "analyticsadmin.properties.webDataStreams.getGlobalSiteTag" call. 15168// Exactly one of *GoogleAnalyticsAdminV1alphaGlobalSiteTag or error 15169// will be non-nil. Any non-2xx status code is an error. Response 15170// headers are in either 15171// *GoogleAnalyticsAdminV1alphaGlobalSiteTag.ServerResponse.Header or 15172// (if a response was returned at all) in 15173// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15174// whether the returned error was because http.StatusNotModified was 15175// returned. 15176func (c *PropertiesWebDataStreamsGetGlobalSiteTagCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaGlobalSiteTag, error) { 15177 gensupport.SetOptions(c.urlParams_, opts...) 15178 res, err := c.doRequest("json") 15179 if res != nil && res.StatusCode == http.StatusNotModified { 15180 if res.Body != nil { 15181 res.Body.Close() 15182 } 15183 return nil, &googleapi.Error{ 15184 Code: res.StatusCode, 15185 Header: res.Header, 15186 } 15187 } 15188 if err != nil { 15189 return nil, err 15190 } 15191 defer googleapi.CloseBody(res) 15192 if err := googleapi.CheckResponse(res); err != nil { 15193 return nil, err 15194 } 15195 ret := &GoogleAnalyticsAdminV1alphaGlobalSiteTag{ 15196 ServerResponse: googleapi.ServerResponse{ 15197 Header: res.Header, 15198 HTTPStatusCode: res.StatusCode, 15199 }, 15200 } 15201 target := &ret 15202 if err := gensupport.DecodeResponse(target, res); err != nil { 15203 return nil, err 15204 } 15205 return ret, nil 15206 // { 15207 // "description": "Returns the Site Tag for the specified web stream. Site Tags are immutable singletons.", 15208 // "flatPath": "v1alpha/properties/{propertiesId}/webDataStreams/{webDataStreamsId}/globalSiteTag", 15209 // "httpMethod": "GET", 15210 // "id": "analyticsadmin.properties.webDataStreams.getGlobalSiteTag", 15211 // "parameterOrder": [ 15212 // "name" 15213 // ], 15214 // "parameters": { 15215 // "name": { 15216 // "description": "Required. The name of the site tag to lookup. Note that site tags are singletons and do not have unique IDs. Format: properties/{property_id}/webDataStreams/{stream_id}/globalSiteTag Example: \"properties/123/webDataStreams/456/globalSiteTag\"", 15217 // "location": "path", 15218 // "pattern": "^properties/[^/]+/webDataStreams/[^/]+/globalSiteTag$", 15219 // "required": true, 15220 // "type": "string" 15221 // } 15222 // }, 15223 // "path": "v1alpha/{+name}", 15224 // "response": { 15225 // "$ref": "GoogleAnalyticsAdminV1alphaGlobalSiteTag" 15226 // }, 15227 // "scopes": [ 15228 // "https://www.googleapis.com/auth/analytics.edit", 15229 // "https://www.googleapis.com/auth/analytics.readonly" 15230 // ] 15231 // } 15232 15233} 15234 15235// method id "analyticsadmin.properties.webDataStreams.list": 15236 15237type PropertiesWebDataStreamsListCall struct { 15238 s *Service 15239 parent string 15240 urlParams_ gensupport.URLParams 15241 ifNoneMatch_ string 15242 ctx_ context.Context 15243 header_ http.Header 15244} 15245 15246// List: Returns child web data streams under the specified parent 15247// property. Web data streams will be excluded if the caller does not 15248// have access. Returns an empty list if no relevant web data streams 15249// are found. 15250// 15251// - parent: The name of the parent property. For example, to list 15252// results of web streams under the property with Id 123: 15253// "properties/123". 15254func (r *PropertiesWebDataStreamsService) List(parent string) *PropertiesWebDataStreamsListCall { 15255 c := &PropertiesWebDataStreamsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15256 c.parent = parent 15257 return c 15258} 15259 15260// PageSize sets the optional parameter "pageSize": The maximum number 15261// of resources to return. If unspecified, at most 50 resources will be 15262// returned. The maximum value is 200; (higher values will be coerced to 15263// the maximum) 15264func (c *PropertiesWebDataStreamsListCall) PageSize(pageSize int64) *PropertiesWebDataStreamsListCall { 15265 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 15266 return c 15267} 15268 15269// PageToken sets the optional parameter "pageToken": A page token, 15270// received from a previous `ListWebDataStreams` call. Provide this to 15271// retrieve the subsequent page. When paginating, all other parameters 15272// provided to `ListWebDataStreams` must match the call that provided 15273// the page token. 15274func (c *PropertiesWebDataStreamsListCall) PageToken(pageToken string) *PropertiesWebDataStreamsListCall { 15275 c.urlParams_.Set("pageToken", pageToken) 15276 return c 15277} 15278 15279// Fields allows partial responses to be retrieved. See 15280// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15281// for more information. 15282func (c *PropertiesWebDataStreamsListCall) Fields(s ...googleapi.Field) *PropertiesWebDataStreamsListCall { 15283 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15284 return c 15285} 15286 15287// IfNoneMatch sets the optional parameter which makes the operation 15288// fail if the object's ETag matches the given value. This is useful for 15289// getting updates only after the object has changed since the last 15290// request. Use googleapi.IsNotModified to check whether the response 15291// error from Do is the result of In-None-Match. 15292func (c *PropertiesWebDataStreamsListCall) IfNoneMatch(entityTag string) *PropertiesWebDataStreamsListCall { 15293 c.ifNoneMatch_ = entityTag 15294 return c 15295} 15296 15297// Context sets the context to be used in this call's Do method. Any 15298// pending HTTP request will be aborted if the provided context is 15299// canceled. 15300func (c *PropertiesWebDataStreamsListCall) Context(ctx context.Context) *PropertiesWebDataStreamsListCall { 15301 c.ctx_ = ctx 15302 return c 15303} 15304 15305// Header returns an http.Header that can be modified by the caller to 15306// add HTTP headers to the request. 15307func (c *PropertiesWebDataStreamsListCall) Header() http.Header { 15308 if c.header_ == nil { 15309 c.header_ = make(http.Header) 15310 } 15311 return c.header_ 15312} 15313 15314func (c *PropertiesWebDataStreamsListCall) doRequest(alt string) (*http.Response, error) { 15315 reqHeaders := make(http.Header) 15316 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 15317 for k, v := range c.header_ { 15318 reqHeaders[k] = v 15319 } 15320 reqHeaders.Set("User-Agent", c.s.userAgent()) 15321 if c.ifNoneMatch_ != "" { 15322 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15323 } 15324 var body io.Reader = nil 15325 c.urlParams_.Set("alt", alt) 15326 c.urlParams_.Set("prettyPrint", "false") 15327 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/webDataStreams") 15328 urls += "?" + c.urlParams_.Encode() 15329 req, err := http.NewRequest("GET", urls, body) 15330 if err != nil { 15331 return nil, err 15332 } 15333 req.Header = reqHeaders 15334 googleapi.Expand(req.URL, map[string]string{ 15335 "parent": c.parent, 15336 }) 15337 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15338} 15339 15340// Do executes the "analyticsadmin.properties.webDataStreams.list" call. 15341// Exactly one of *GoogleAnalyticsAdminV1alphaListWebDataStreamsResponse 15342// or error will be non-nil. Any non-2xx status code is an error. 15343// Response headers are in either 15344// *GoogleAnalyticsAdminV1alphaListWebDataStreamsResponse.ServerResponse. 15345// Header or (if a response was returned at all) in 15346// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15347// whether the returned error was because http.StatusNotModified was 15348// returned. 15349func (c *PropertiesWebDataStreamsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListWebDataStreamsResponse, error) { 15350 gensupport.SetOptions(c.urlParams_, opts...) 15351 res, err := c.doRequest("json") 15352 if res != nil && res.StatusCode == http.StatusNotModified { 15353 if res.Body != nil { 15354 res.Body.Close() 15355 } 15356 return nil, &googleapi.Error{ 15357 Code: res.StatusCode, 15358 Header: res.Header, 15359 } 15360 } 15361 if err != nil { 15362 return nil, err 15363 } 15364 defer googleapi.CloseBody(res) 15365 if err := googleapi.CheckResponse(res); err != nil { 15366 return nil, err 15367 } 15368 ret := &GoogleAnalyticsAdminV1alphaListWebDataStreamsResponse{ 15369 ServerResponse: googleapi.ServerResponse{ 15370 Header: res.Header, 15371 HTTPStatusCode: res.StatusCode, 15372 }, 15373 } 15374 target := &ret 15375 if err := gensupport.DecodeResponse(target, res); err != nil { 15376 return nil, err 15377 } 15378 return ret, nil 15379 // { 15380 // "description": "Returns child web data streams under the specified parent property. Web data streams will be excluded if the caller does not have access. Returns an empty list if no relevant web data streams are found.", 15381 // "flatPath": "v1alpha/properties/{propertiesId}/webDataStreams", 15382 // "httpMethod": "GET", 15383 // "id": "analyticsadmin.properties.webDataStreams.list", 15384 // "parameterOrder": [ 15385 // "parent" 15386 // ], 15387 // "parameters": { 15388 // "pageSize": { 15389 // "description": "The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)", 15390 // "format": "int32", 15391 // "location": "query", 15392 // "type": "integer" 15393 // }, 15394 // "pageToken": { 15395 // "description": "A page token, received from a previous `ListWebDataStreams` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListWebDataStreams` must match the call that provided the page token.", 15396 // "location": "query", 15397 // "type": "string" 15398 // }, 15399 // "parent": { 15400 // "description": "Required. The name of the parent property. For example, to list results of web streams under the property with Id 123: \"properties/123\"", 15401 // "location": "path", 15402 // "pattern": "^properties/[^/]+$", 15403 // "required": true, 15404 // "type": "string" 15405 // } 15406 // }, 15407 // "path": "v1alpha/{+parent}/webDataStreams", 15408 // "response": { 15409 // "$ref": "GoogleAnalyticsAdminV1alphaListWebDataStreamsResponse" 15410 // }, 15411 // "scopes": [ 15412 // "https://www.googleapis.com/auth/analytics.edit", 15413 // "https://www.googleapis.com/auth/analytics.readonly" 15414 // ] 15415 // } 15416 15417} 15418 15419// Pages invokes f for each page of results. 15420// A non-nil error returned from f will halt the iteration. 15421// The provided context supersedes any context provided to the Context method. 15422func (c *PropertiesWebDataStreamsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListWebDataStreamsResponse) error) error { 15423 c.ctx_ = ctx 15424 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 15425 for { 15426 x, err := c.Do() 15427 if err != nil { 15428 return err 15429 } 15430 if err := f(x); err != nil { 15431 return err 15432 } 15433 if x.NextPageToken == "" { 15434 return nil 15435 } 15436 c.PageToken(x.NextPageToken) 15437 } 15438} 15439 15440// method id "analyticsadmin.properties.webDataStreams.patch": 15441 15442type PropertiesWebDataStreamsPatchCall struct { 15443 s *Service 15444 name string 15445 googleanalyticsadminv1alphawebdatastream *GoogleAnalyticsAdminV1alphaWebDataStream 15446 urlParams_ gensupport.URLParams 15447 ctx_ context.Context 15448 header_ http.Header 15449} 15450 15451// Patch: Updates a web stream on a property. 15452// 15453// - name: Output only. Resource name of this Data Stream. Format: 15454// properties/{property_id}/webDataStreams/{stream_id} Example: 15455// "properties/1000/webDataStreams/2000". 15456func (r *PropertiesWebDataStreamsService) Patch(name string, googleanalyticsadminv1alphawebdatastream *GoogleAnalyticsAdminV1alphaWebDataStream) *PropertiesWebDataStreamsPatchCall { 15457 c := &PropertiesWebDataStreamsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15458 c.name = name 15459 c.googleanalyticsadminv1alphawebdatastream = googleanalyticsadminv1alphawebdatastream 15460 return c 15461} 15462 15463// UpdateMask sets the optional parameter "updateMask": Required. The 15464// list of fields to be updated. Field names must be in snake case 15465// (e.g., "field_to_update"). Omitted fields will not be updated. To 15466// replace the entire entity, use one path with the string "*" to match 15467// all fields. 15468func (c *PropertiesWebDataStreamsPatchCall) UpdateMask(updateMask string) *PropertiesWebDataStreamsPatchCall { 15469 c.urlParams_.Set("updateMask", updateMask) 15470 return c 15471} 15472 15473// Fields allows partial responses to be retrieved. See 15474// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15475// for more information. 15476func (c *PropertiesWebDataStreamsPatchCall) Fields(s ...googleapi.Field) *PropertiesWebDataStreamsPatchCall { 15477 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15478 return c 15479} 15480 15481// Context sets the context to be used in this call's Do method. Any 15482// pending HTTP request will be aborted if the provided context is 15483// canceled. 15484func (c *PropertiesWebDataStreamsPatchCall) Context(ctx context.Context) *PropertiesWebDataStreamsPatchCall { 15485 c.ctx_ = ctx 15486 return c 15487} 15488 15489// Header returns an http.Header that can be modified by the caller to 15490// add HTTP headers to the request. 15491func (c *PropertiesWebDataStreamsPatchCall) Header() http.Header { 15492 if c.header_ == nil { 15493 c.header_ = make(http.Header) 15494 } 15495 return c.header_ 15496} 15497 15498func (c *PropertiesWebDataStreamsPatchCall) doRequest(alt string) (*http.Response, error) { 15499 reqHeaders := make(http.Header) 15500 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 15501 for k, v := range c.header_ { 15502 reqHeaders[k] = v 15503 } 15504 reqHeaders.Set("User-Agent", c.s.userAgent()) 15505 var body io.Reader = nil 15506 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphawebdatastream) 15507 if err != nil { 15508 return nil, err 15509 } 15510 reqHeaders.Set("Content-Type", "application/json") 15511 c.urlParams_.Set("alt", alt) 15512 c.urlParams_.Set("prettyPrint", "false") 15513 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 15514 urls += "?" + c.urlParams_.Encode() 15515 req, err := http.NewRequest("PATCH", urls, body) 15516 if err != nil { 15517 return nil, err 15518 } 15519 req.Header = reqHeaders 15520 googleapi.Expand(req.URL, map[string]string{ 15521 "name": c.name, 15522 }) 15523 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15524} 15525 15526// Do executes the "analyticsadmin.properties.webDataStreams.patch" call. 15527// Exactly one of *GoogleAnalyticsAdminV1alphaWebDataStream or error 15528// will be non-nil. Any non-2xx status code is an error. Response 15529// headers are in either 15530// *GoogleAnalyticsAdminV1alphaWebDataStream.ServerResponse.Header or 15531// (if a response was returned at all) in 15532// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15533// whether the returned error was because http.StatusNotModified was 15534// returned. 15535func (c *PropertiesWebDataStreamsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaWebDataStream, error) { 15536 gensupport.SetOptions(c.urlParams_, opts...) 15537 res, err := c.doRequest("json") 15538 if res != nil && res.StatusCode == http.StatusNotModified { 15539 if res.Body != nil { 15540 res.Body.Close() 15541 } 15542 return nil, &googleapi.Error{ 15543 Code: res.StatusCode, 15544 Header: res.Header, 15545 } 15546 } 15547 if err != nil { 15548 return nil, err 15549 } 15550 defer googleapi.CloseBody(res) 15551 if err := googleapi.CheckResponse(res); err != nil { 15552 return nil, err 15553 } 15554 ret := &GoogleAnalyticsAdminV1alphaWebDataStream{ 15555 ServerResponse: googleapi.ServerResponse{ 15556 Header: res.Header, 15557 HTTPStatusCode: res.StatusCode, 15558 }, 15559 } 15560 target := &ret 15561 if err := gensupport.DecodeResponse(target, res); err != nil { 15562 return nil, err 15563 } 15564 return ret, nil 15565 // { 15566 // "description": "Updates a web stream on a property.", 15567 // "flatPath": "v1alpha/properties/{propertiesId}/webDataStreams/{webDataStreamsId}", 15568 // "httpMethod": "PATCH", 15569 // "id": "analyticsadmin.properties.webDataStreams.patch", 15570 // "parameterOrder": [ 15571 // "name" 15572 // ], 15573 // "parameters": { 15574 // "name": { 15575 // "description": "Output only. Resource name of this Data Stream. Format: properties/{property_id}/webDataStreams/{stream_id} Example: \"properties/1000/webDataStreams/2000\"", 15576 // "location": "path", 15577 // "pattern": "^properties/[^/]+/webDataStreams/[^/]+$", 15578 // "required": true, 15579 // "type": "string" 15580 // }, 15581 // "updateMask": { 15582 // "description": "Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the entire entity, use one path with the string \"*\" to match all fields.", 15583 // "format": "google-fieldmask", 15584 // "location": "query", 15585 // "type": "string" 15586 // } 15587 // }, 15588 // "path": "v1alpha/{+name}", 15589 // "request": { 15590 // "$ref": "GoogleAnalyticsAdminV1alphaWebDataStream" 15591 // }, 15592 // "response": { 15593 // "$ref": "GoogleAnalyticsAdminV1alphaWebDataStream" 15594 // }, 15595 // "scopes": [ 15596 // "https://www.googleapis.com/auth/analytics.edit" 15597 // ] 15598 // } 15599 15600} 15601 15602// method id "analyticsadmin.properties.webDataStreams.updateEnhancedMeasurementSettings": 15603 15604type PropertiesWebDataStreamsUpdateEnhancedMeasurementSettingsCall struct { 15605 s *Service 15606 name string 15607 googleanalyticsadminv1alphaenhancedmeasurementsettings *GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings 15608 urlParams_ gensupport.URLParams 15609 ctx_ context.Context 15610 header_ http.Header 15611} 15612 15613// UpdateEnhancedMeasurementSettings: Updates the singleton enhanced 15614// measurement settings for this web stream. Note that the stream must 15615// enable enhanced measurement for these settings to take effect. 15616// 15617// - name: Output only. Resource name of this Data Stream. Format: 15618// properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurem 15619// entSettings Example: 15620// "properties/1000/webDataStreams/2000/enhancedMeasurementSettings". 15621func (r *PropertiesWebDataStreamsService) UpdateEnhancedMeasurementSettings(name string, googleanalyticsadminv1alphaenhancedmeasurementsettings *GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings) *PropertiesWebDataStreamsUpdateEnhancedMeasurementSettingsCall { 15622 c := &PropertiesWebDataStreamsUpdateEnhancedMeasurementSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15623 c.name = name 15624 c.googleanalyticsadminv1alphaenhancedmeasurementsettings = googleanalyticsadminv1alphaenhancedmeasurementsettings 15625 return c 15626} 15627 15628// UpdateMask sets the optional parameter "updateMask": Required. The 15629// list of fields to be updated. Field names must be in snake case 15630// (e.g., "field_to_update"). Omitted fields will not be updated. To 15631// replace the entire entity, use one path with the string "*" to match 15632// all fields. 15633func (c *PropertiesWebDataStreamsUpdateEnhancedMeasurementSettingsCall) UpdateMask(updateMask string) *PropertiesWebDataStreamsUpdateEnhancedMeasurementSettingsCall { 15634 c.urlParams_.Set("updateMask", updateMask) 15635 return c 15636} 15637 15638// Fields allows partial responses to be retrieved. See 15639// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15640// for more information. 15641func (c *PropertiesWebDataStreamsUpdateEnhancedMeasurementSettingsCall) Fields(s ...googleapi.Field) *PropertiesWebDataStreamsUpdateEnhancedMeasurementSettingsCall { 15642 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15643 return c 15644} 15645 15646// Context sets the context to be used in this call's Do method. Any 15647// pending HTTP request will be aborted if the provided context is 15648// canceled. 15649func (c *PropertiesWebDataStreamsUpdateEnhancedMeasurementSettingsCall) Context(ctx context.Context) *PropertiesWebDataStreamsUpdateEnhancedMeasurementSettingsCall { 15650 c.ctx_ = ctx 15651 return c 15652} 15653 15654// Header returns an http.Header that can be modified by the caller to 15655// add HTTP headers to the request. 15656func (c *PropertiesWebDataStreamsUpdateEnhancedMeasurementSettingsCall) Header() http.Header { 15657 if c.header_ == nil { 15658 c.header_ = make(http.Header) 15659 } 15660 return c.header_ 15661} 15662 15663func (c *PropertiesWebDataStreamsUpdateEnhancedMeasurementSettingsCall) doRequest(alt string) (*http.Response, error) { 15664 reqHeaders := make(http.Header) 15665 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 15666 for k, v := range c.header_ { 15667 reqHeaders[k] = v 15668 } 15669 reqHeaders.Set("User-Agent", c.s.userAgent()) 15670 var body io.Reader = nil 15671 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaenhancedmeasurementsettings) 15672 if err != nil { 15673 return nil, err 15674 } 15675 reqHeaders.Set("Content-Type", "application/json") 15676 c.urlParams_.Set("alt", alt) 15677 c.urlParams_.Set("prettyPrint", "false") 15678 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 15679 urls += "?" + c.urlParams_.Encode() 15680 req, err := http.NewRequest("PATCH", urls, body) 15681 if err != nil { 15682 return nil, err 15683 } 15684 req.Header = reqHeaders 15685 googleapi.Expand(req.URL, map[string]string{ 15686 "name": c.name, 15687 }) 15688 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15689} 15690 15691// Do executes the "analyticsadmin.properties.webDataStreams.updateEnhancedMeasurementSettings" call. 15692// Exactly one of 15693// *GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings or error will 15694// be non-nil. Any non-2xx status code is an error. Response headers are 15695// in either 15696// *GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings.ServerResponse 15697// .Header or (if a response was returned at all) in 15698// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15699// whether the returned error was because http.StatusNotModified was 15700// returned. 15701func (c *PropertiesWebDataStreamsUpdateEnhancedMeasurementSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings, error) { 15702 gensupport.SetOptions(c.urlParams_, opts...) 15703 res, err := c.doRequest("json") 15704 if res != nil && res.StatusCode == http.StatusNotModified { 15705 if res.Body != nil { 15706 res.Body.Close() 15707 } 15708 return nil, &googleapi.Error{ 15709 Code: res.StatusCode, 15710 Header: res.Header, 15711 } 15712 } 15713 if err != nil { 15714 return nil, err 15715 } 15716 defer googleapi.CloseBody(res) 15717 if err := googleapi.CheckResponse(res); err != nil { 15718 return nil, err 15719 } 15720 ret := &GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings{ 15721 ServerResponse: googleapi.ServerResponse{ 15722 Header: res.Header, 15723 HTTPStatusCode: res.StatusCode, 15724 }, 15725 } 15726 target := &ret 15727 if err := gensupport.DecodeResponse(target, res); err != nil { 15728 return nil, err 15729 } 15730 return ret, nil 15731 // { 15732 // "description": "Updates the singleton enhanced measurement settings for this web stream. Note that the stream must enable enhanced measurement for these settings to take effect.", 15733 // "flatPath": "v1alpha/properties/{propertiesId}/webDataStreams/{webDataStreamsId}/enhancedMeasurementSettings", 15734 // "httpMethod": "PATCH", 15735 // "id": "analyticsadmin.properties.webDataStreams.updateEnhancedMeasurementSettings", 15736 // "parameterOrder": [ 15737 // "name" 15738 // ], 15739 // "parameters": { 15740 // "name": { 15741 // "description": "Output only. Resource name of this Data Stream. Format: properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings Example: \"properties/1000/webDataStreams/2000/enhancedMeasurementSettings\"", 15742 // "location": "path", 15743 // "pattern": "^properties/[^/]+/webDataStreams/[^/]+/enhancedMeasurementSettings$", 15744 // "required": true, 15745 // "type": "string" 15746 // }, 15747 // "updateMask": { 15748 // "description": "Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the entire entity, use one path with the string \"*\" to match all fields.", 15749 // "format": "google-fieldmask", 15750 // "location": "query", 15751 // "type": "string" 15752 // } 15753 // }, 15754 // "path": "v1alpha/{+name}", 15755 // "request": { 15756 // "$ref": "GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings" 15757 // }, 15758 // "response": { 15759 // "$ref": "GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings" 15760 // }, 15761 // "scopes": [ 15762 // "https://www.googleapis.com/auth/analytics.edit" 15763 // ] 15764 // } 15765 15766} 15767 15768// method id "analyticsadmin.properties.webDataStreams.measurementProtocolSecrets.create": 15769 15770type PropertiesWebDataStreamsMeasurementProtocolSecretsCreateCall struct { 15771 s *Service 15772 parent string 15773 googleanalyticsadminv1alphameasurementprotocolsecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret 15774 urlParams_ gensupport.URLParams 15775 ctx_ context.Context 15776 header_ http.Header 15777} 15778 15779// Create: Creates a measurement protocol secret. 15780// 15781// - parent: The parent resource where this secret will be created. Any 15782// type of stream (WebDataStream, IosAppDataStream, 15783// AndroidAppDataStream) may be a parent. Format: 15784// properties/{property}/webDataStreams/{webDataStream}. 15785func (r *PropertiesWebDataStreamsMeasurementProtocolSecretsService) Create(parent string, googleanalyticsadminv1alphameasurementprotocolsecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret) *PropertiesWebDataStreamsMeasurementProtocolSecretsCreateCall { 15786 c := &PropertiesWebDataStreamsMeasurementProtocolSecretsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15787 c.parent = parent 15788 c.googleanalyticsadminv1alphameasurementprotocolsecret = googleanalyticsadminv1alphameasurementprotocolsecret 15789 return c 15790} 15791 15792// Fields allows partial responses to be retrieved. See 15793// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15794// for more information. 15795func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsCreateCall) Fields(s ...googleapi.Field) *PropertiesWebDataStreamsMeasurementProtocolSecretsCreateCall { 15796 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15797 return c 15798} 15799 15800// Context sets the context to be used in this call's Do method. Any 15801// pending HTTP request will be aborted if the provided context is 15802// canceled. 15803func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsCreateCall) Context(ctx context.Context) *PropertiesWebDataStreamsMeasurementProtocolSecretsCreateCall { 15804 c.ctx_ = ctx 15805 return c 15806} 15807 15808// Header returns an http.Header that can be modified by the caller to 15809// add HTTP headers to the request. 15810func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsCreateCall) Header() http.Header { 15811 if c.header_ == nil { 15812 c.header_ = make(http.Header) 15813 } 15814 return c.header_ 15815} 15816 15817func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsCreateCall) doRequest(alt string) (*http.Response, error) { 15818 reqHeaders := make(http.Header) 15819 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 15820 for k, v := range c.header_ { 15821 reqHeaders[k] = v 15822 } 15823 reqHeaders.Set("User-Agent", c.s.userAgent()) 15824 var body io.Reader = nil 15825 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphameasurementprotocolsecret) 15826 if err != nil { 15827 return nil, err 15828 } 15829 reqHeaders.Set("Content-Type", "application/json") 15830 c.urlParams_.Set("alt", alt) 15831 c.urlParams_.Set("prettyPrint", "false") 15832 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/measurementProtocolSecrets") 15833 urls += "?" + c.urlParams_.Encode() 15834 req, err := http.NewRequest("POST", urls, body) 15835 if err != nil { 15836 return nil, err 15837 } 15838 req.Header = reqHeaders 15839 googleapi.Expand(req.URL, map[string]string{ 15840 "parent": c.parent, 15841 }) 15842 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15843} 15844 15845// Do executes the "analyticsadmin.properties.webDataStreams.measurementProtocolSecrets.create" call. 15846// Exactly one of *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret 15847// or error will be non-nil. Any non-2xx status code is an error. 15848// Response headers are in either 15849// *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret.ServerResponse.H 15850// eader or (if a response was returned at all) in 15851// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15852// whether the returned error was because http.StatusNotModified was 15853// returned. 15854func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret, error) { 15855 gensupport.SetOptions(c.urlParams_, opts...) 15856 res, err := c.doRequest("json") 15857 if res != nil && res.StatusCode == http.StatusNotModified { 15858 if res.Body != nil { 15859 res.Body.Close() 15860 } 15861 return nil, &googleapi.Error{ 15862 Code: res.StatusCode, 15863 Header: res.Header, 15864 } 15865 } 15866 if err != nil { 15867 return nil, err 15868 } 15869 defer googleapi.CloseBody(res) 15870 if err := googleapi.CheckResponse(res); err != nil { 15871 return nil, err 15872 } 15873 ret := &GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret{ 15874 ServerResponse: googleapi.ServerResponse{ 15875 Header: res.Header, 15876 HTTPStatusCode: res.StatusCode, 15877 }, 15878 } 15879 target := &ret 15880 if err := gensupport.DecodeResponse(target, res); err != nil { 15881 return nil, err 15882 } 15883 return ret, nil 15884 // { 15885 // "description": "Creates a measurement protocol secret.", 15886 // "flatPath": "v1alpha/properties/{propertiesId}/webDataStreams/{webDataStreamsId}/measurementProtocolSecrets", 15887 // "httpMethod": "POST", 15888 // "id": "analyticsadmin.properties.webDataStreams.measurementProtocolSecrets.create", 15889 // "parameterOrder": [ 15890 // "parent" 15891 // ], 15892 // "parameters": { 15893 // "parent": { 15894 // "description": "Required. The parent resource where this secret will be created. Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent. Format: properties/{property}/webDataStreams/{webDataStream}", 15895 // "location": "path", 15896 // "pattern": "^properties/[^/]+/webDataStreams/[^/]+$", 15897 // "required": true, 15898 // "type": "string" 15899 // } 15900 // }, 15901 // "path": "v1alpha/{+parent}/measurementProtocolSecrets", 15902 // "request": { 15903 // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" 15904 // }, 15905 // "response": { 15906 // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" 15907 // }, 15908 // "scopes": [ 15909 // "https://www.googleapis.com/auth/analytics.edit" 15910 // ] 15911 // } 15912 15913} 15914 15915// method id "analyticsadmin.properties.webDataStreams.measurementProtocolSecrets.delete": 15916 15917type PropertiesWebDataStreamsMeasurementProtocolSecretsDeleteCall struct { 15918 s *Service 15919 name string 15920 urlParams_ gensupport.URLParams 15921 ctx_ context.Context 15922 header_ http.Header 15923} 15924 15925// Delete: Deletes target MeasurementProtocolSecret. 15926// 15927// - name: The name of the MeasurementProtocolSecret to delete. Format: 15928// properties/{property}/webDataStreams/{webDataStream}/measurementProt 15929// ocolSecrets/{measurementProtocolSecret} Note: Any type of stream 15930// (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a 15931// parent. 15932func (r *PropertiesWebDataStreamsMeasurementProtocolSecretsService) Delete(name string) *PropertiesWebDataStreamsMeasurementProtocolSecretsDeleteCall { 15933 c := &PropertiesWebDataStreamsMeasurementProtocolSecretsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15934 c.name = name 15935 return c 15936} 15937 15938// Fields allows partial responses to be retrieved. See 15939// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15940// for more information. 15941func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsDeleteCall) Fields(s ...googleapi.Field) *PropertiesWebDataStreamsMeasurementProtocolSecretsDeleteCall { 15942 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15943 return c 15944} 15945 15946// Context sets the context to be used in this call's Do method. Any 15947// pending HTTP request will be aborted if the provided context is 15948// canceled. 15949func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsDeleteCall) Context(ctx context.Context) *PropertiesWebDataStreamsMeasurementProtocolSecretsDeleteCall { 15950 c.ctx_ = ctx 15951 return c 15952} 15953 15954// Header returns an http.Header that can be modified by the caller to 15955// add HTTP headers to the request. 15956func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsDeleteCall) Header() http.Header { 15957 if c.header_ == nil { 15958 c.header_ = make(http.Header) 15959 } 15960 return c.header_ 15961} 15962 15963func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsDeleteCall) doRequest(alt string) (*http.Response, error) { 15964 reqHeaders := make(http.Header) 15965 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 15966 for k, v := range c.header_ { 15967 reqHeaders[k] = v 15968 } 15969 reqHeaders.Set("User-Agent", c.s.userAgent()) 15970 var body io.Reader = nil 15971 c.urlParams_.Set("alt", alt) 15972 c.urlParams_.Set("prettyPrint", "false") 15973 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 15974 urls += "?" + c.urlParams_.Encode() 15975 req, err := http.NewRequest("DELETE", urls, body) 15976 if err != nil { 15977 return nil, err 15978 } 15979 req.Header = reqHeaders 15980 googleapi.Expand(req.URL, map[string]string{ 15981 "name": c.name, 15982 }) 15983 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15984} 15985 15986// Do executes the "analyticsadmin.properties.webDataStreams.measurementProtocolSecrets.delete" call. 15987// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 15988// non-2xx status code is an error. Response headers are in either 15989// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 15990// returned at all) in error.(*googleapi.Error).Header. Use 15991// googleapi.IsNotModified to check whether the returned error was 15992// because http.StatusNotModified was returned. 15993func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 15994 gensupport.SetOptions(c.urlParams_, opts...) 15995 res, err := c.doRequest("json") 15996 if res != nil && res.StatusCode == http.StatusNotModified { 15997 if res.Body != nil { 15998 res.Body.Close() 15999 } 16000 return nil, &googleapi.Error{ 16001 Code: res.StatusCode, 16002 Header: res.Header, 16003 } 16004 } 16005 if err != nil { 16006 return nil, err 16007 } 16008 defer googleapi.CloseBody(res) 16009 if err := googleapi.CheckResponse(res); err != nil { 16010 return nil, err 16011 } 16012 ret := &GoogleProtobufEmpty{ 16013 ServerResponse: googleapi.ServerResponse{ 16014 Header: res.Header, 16015 HTTPStatusCode: res.StatusCode, 16016 }, 16017 } 16018 target := &ret 16019 if err := gensupport.DecodeResponse(target, res); err != nil { 16020 return nil, err 16021 } 16022 return ret, nil 16023 // { 16024 // "description": "Deletes target MeasurementProtocolSecret.", 16025 // "flatPath": "v1alpha/properties/{propertiesId}/webDataStreams/{webDataStreamsId}/measurementProtocolSecrets/{measurementProtocolSecretsId}", 16026 // "httpMethod": "DELETE", 16027 // "id": "analyticsadmin.properties.webDataStreams.measurementProtocolSecrets.delete", 16028 // "parameterOrder": [ 16029 // "name" 16030 // ], 16031 // "parameters": { 16032 // "name": { 16033 // "description": "Required. The name of the MeasurementProtocolSecret to delete. Format: properties/{property}/webDataStreams/{webDataStream}/measurementProtocolSecrets/{measurementProtocolSecret} Note: Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent.", 16034 // "location": "path", 16035 // "pattern": "^properties/[^/]+/webDataStreams/[^/]+/measurementProtocolSecrets/[^/]+$", 16036 // "required": true, 16037 // "type": "string" 16038 // } 16039 // }, 16040 // "path": "v1alpha/{+name}", 16041 // "response": { 16042 // "$ref": "GoogleProtobufEmpty" 16043 // }, 16044 // "scopes": [ 16045 // "https://www.googleapis.com/auth/analytics.edit" 16046 // ] 16047 // } 16048 16049} 16050 16051// method id "analyticsadmin.properties.webDataStreams.measurementProtocolSecrets.get": 16052 16053type PropertiesWebDataStreamsMeasurementProtocolSecretsGetCall struct { 16054 s *Service 16055 name string 16056 urlParams_ gensupport.URLParams 16057 ifNoneMatch_ string 16058 ctx_ context.Context 16059 header_ http.Header 16060} 16061 16062// Get: Lookup for a single "GA4" MeasurementProtocolSecret. 16063// 16064// - name: The name of the measurement protocol secret to lookup. 16065// Format: 16066// properties/{property}/webDataStreams/{webDataStream}/measurementProt 16067// ocolSecrets/{measurementProtocolSecret} Note: Any type of stream 16068// (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a 16069// parent. 16070func (r *PropertiesWebDataStreamsMeasurementProtocolSecretsService) Get(name string) *PropertiesWebDataStreamsMeasurementProtocolSecretsGetCall { 16071 c := &PropertiesWebDataStreamsMeasurementProtocolSecretsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16072 c.name = name 16073 return c 16074} 16075 16076// Fields allows partial responses to be retrieved. See 16077// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16078// for more information. 16079func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsGetCall) Fields(s ...googleapi.Field) *PropertiesWebDataStreamsMeasurementProtocolSecretsGetCall { 16080 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16081 return c 16082} 16083 16084// IfNoneMatch sets the optional parameter which makes the operation 16085// fail if the object's ETag matches the given value. This is useful for 16086// getting updates only after the object has changed since the last 16087// request. Use googleapi.IsNotModified to check whether the response 16088// error from Do is the result of In-None-Match. 16089func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsGetCall) IfNoneMatch(entityTag string) *PropertiesWebDataStreamsMeasurementProtocolSecretsGetCall { 16090 c.ifNoneMatch_ = entityTag 16091 return c 16092} 16093 16094// Context sets the context to be used in this call's Do method. Any 16095// pending HTTP request will be aborted if the provided context is 16096// canceled. 16097func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsGetCall) Context(ctx context.Context) *PropertiesWebDataStreamsMeasurementProtocolSecretsGetCall { 16098 c.ctx_ = ctx 16099 return c 16100} 16101 16102// Header returns an http.Header that can be modified by the caller to 16103// add HTTP headers to the request. 16104func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsGetCall) Header() http.Header { 16105 if c.header_ == nil { 16106 c.header_ = make(http.Header) 16107 } 16108 return c.header_ 16109} 16110 16111func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsGetCall) doRequest(alt string) (*http.Response, error) { 16112 reqHeaders := make(http.Header) 16113 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 16114 for k, v := range c.header_ { 16115 reqHeaders[k] = v 16116 } 16117 reqHeaders.Set("User-Agent", c.s.userAgent()) 16118 if c.ifNoneMatch_ != "" { 16119 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16120 } 16121 var body io.Reader = nil 16122 c.urlParams_.Set("alt", alt) 16123 c.urlParams_.Set("prettyPrint", "false") 16124 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 16125 urls += "?" + c.urlParams_.Encode() 16126 req, err := http.NewRequest("GET", urls, body) 16127 if err != nil { 16128 return nil, err 16129 } 16130 req.Header = reqHeaders 16131 googleapi.Expand(req.URL, map[string]string{ 16132 "name": c.name, 16133 }) 16134 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16135} 16136 16137// Do executes the "analyticsadmin.properties.webDataStreams.measurementProtocolSecrets.get" call. 16138// Exactly one of *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret 16139// or error will be non-nil. Any non-2xx status code is an error. 16140// Response headers are in either 16141// *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret.ServerResponse.H 16142// eader or (if a response was returned at all) in 16143// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16144// whether the returned error was because http.StatusNotModified was 16145// returned. 16146func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret, error) { 16147 gensupport.SetOptions(c.urlParams_, opts...) 16148 res, err := c.doRequest("json") 16149 if res != nil && res.StatusCode == http.StatusNotModified { 16150 if res.Body != nil { 16151 res.Body.Close() 16152 } 16153 return nil, &googleapi.Error{ 16154 Code: res.StatusCode, 16155 Header: res.Header, 16156 } 16157 } 16158 if err != nil { 16159 return nil, err 16160 } 16161 defer googleapi.CloseBody(res) 16162 if err := googleapi.CheckResponse(res); err != nil { 16163 return nil, err 16164 } 16165 ret := &GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret{ 16166 ServerResponse: googleapi.ServerResponse{ 16167 Header: res.Header, 16168 HTTPStatusCode: res.StatusCode, 16169 }, 16170 } 16171 target := &ret 16172 if err := gensupport.DecodeResponse(target, res); err != nil { 16173 return nil, err 16174 } 16175 return ret, nil 16176 // { 16177 // "description": "Lookup for a single \"GA4\" MeasurementProtocolSecret.", 16178 // "flatPath": "v1alpha/properties/{propertiesId}/webDataStreams/{webDataStreamsId}/measurementProtocolSecrets/{measurementProtocolSecretsId}", 16179 // "httpMethod": "GET", 16180 // "id": "analyticsadmin.properties.webDataStreams.measurementProtocolSecrets.get", 16181 // "parameterOrder": [ 16182 // "name" 16183 // ], 16184 // "parameters": { 16185 // "name": { 16186 // "description": "Required. The name of the measurement protocol secret to lookup. Format: properties/{property}/webDataStreams/{webDataStream}/measurementProtocolSecrets/{measurementProtocolSecret} Note: Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent.", 16187 // "location": "path", 16188 // "pattern": "^properties/[^/]+/webDataStreams/[^/]+/measurementProtocolSecrets/[^/]+$", 16189 // "required": true, 16190 // "type": "string" 16191 // } 16192 // }, 16193 // "path": "v1alpha/{+name}", 16194 // "response": { 16195 // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" 16196 // }, 16197 // "scopes": [ 16198 // "https://www.googleapis.com/auth/analytics.edit", 16199 // "https://www.googleapis.com/auth/analytics.readonly" 16200 // ] 16201 // } 16202 16203} 16204 16205// method id "analyticsadmin.properties.webDataStreams.measurementProtocolSecrets.list": 16206 16207type PropertiesWebDataStreamsMeasurementProtocolSecretsListCall struct { 16208 s *Service 16209 parent string 16210 urlParams_ gensupport.URLParams 16211 ifNoneMatch_ string 16212 ctx_ context.Context 16213 header_ http.Header 16214} 16215 16216// List: Returns child MeasurementProtocolSecrets under the specified 16217// parent Property. 16218// 16219// - parent: The resource name of the parent stream. Any type of stream 16220// (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a 16221// parent. Format: 16222// properties/{property}/webDataStreams/{webDataStream}/measurementProt 16223// ocolSecrets. 16224func (r *PropertiesWebDataStreamsMeasurementProtocolSecretsService) List(parent string) *PropertiesWebDataStreamsMeasurementProtocolSecretsListCall { 16225 c := &PropertiesWebDataStreamsMeasurementProtocolSecretsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16226 c.parent = parent 16227 return c 16228} 16229 16230// PageSize sets the optional parameter "pageSize": The maximum number 16231// of resources to return. If unspecified, at most 10 resources will be 16232// returned. The maximum value is 10. Higher values will be coerced to 16233// the maximum. 16234func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsListCall) PageSize(pageSize int64) *PropertiesWebDataStreamsMeasurementProtocolSecretsListCall { 16235 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 16236 return c 16237} 16238 16239// PageToken sets the optional parameter "pageToken": A page token, 16240// received from a previous `ListMeasurementProtocolSecrets` call. 16241// Provide this to retrieve the subsequent page. When paginating, all 16242// other parameters provided to `ListMeasurementProtocolSecrets` must 16243// match the call that provided the page token. 16244func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsListCall) PageToken(pageToken string) *PropertiesWebDataStreamsMeasurementProtocolSecretsListCall { 16245 c.urlParams_.Set("pageToken", pageToken) 16246 return c 16247} 16248 16249// Fields allows partial responses to be retrieved. See 16250// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16251// for more information. 16252func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsListCall) Fields(s ...googleapi.Field) *PropertiesWebDataStreamsMeasurementProtocolSecretsListCall { 16253 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16254 return c 16255} 16256 16257// IfNoneMatch sets the optional parameter which makes the operation 16258// fail if the object's ETag matches the given value. This is useful for 16259// getting updates only after the object has changed since the last 16260// request. Use googleapi.IsNotModified to check whether the response 16261// error from Do is the result of In-None-Match. 16262func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsListCall) IfNoneMatch(entityTag string) *PropertiesWebDataStreamsMeasurementProtocolSecretsListCall { 16263 c.ifNoneMatch_ = entityTag 16264 return c 16265} 16266 16267// Context sets the context to be used in this call's Do method. Any 16268// pending HTTP request will be aborted if the provided context is 16269// canceled. 16270func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsListCall) Context(ctx context.Context) *PropertiesWebDataStreamsMeasurementProtocolSecretsListCall { 16271 c.ctx_ = ctx 16272 return c 16273} 16274 16275// Header returns an http.Header that can be modified by the caller to 16276// add HTTP headers to the request. 16277func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsListCall) Header() http.Header { 16278 if c.header_ == nil { 16279 c.header_ = make(http.Header) 16280 } 16281 return c.header_ 16282} 16283 16284func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsListCall) doRequest(alt string) (*http.Response, error) { 16285 reqHeaders := make(http.Header) 16286 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 16287 for k, v := range c.header_ { 16288 reqHeaders[k] = v 16289 } 16290 reqHeaders.Set("User-Agent", c.s.userAgent()) 16291 if c.ifNoneMatch_ != "" { 16292 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16293 } 16294 var body io.Reader = nil 16295 c.urlParams_.Set("alt", alt) 16296 c.urlParams_.Set("prettyPrint", "false") 16297 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/measurementProtocolSecrets") 16298 urls += "?" + c.urlParams_.Encode() 16299 req, err := http.NewRequest("GET", urls, body) 16300 if err != nil { 16301 return nil, err 16302 } 16303 req.Header = reqHeaders 16304 googleapi.Expand(req.URL, map[string]string{ 16305 "parent": c.parent, 16306 }) 16307 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16308} 16309 16310// Do executes the "analyticsadmin.properties.webDataStreams.measurementProtocolSecrets.list" call. 16311// Exactly one of 16312// *GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse or 16313// error will be non-nil. Any non-2xx status code is an error. Response 16314// headers are in either 16315// *GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse.Ser 16316// verResponse.Header or (if a response was returned at all) in 16317// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16318// whether the returned error was because http.StatusNotModified was 16319// returned. 16320func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse, error) { 16321 gensupport.SetOptions(c.urlParams_, opts...) 16322 res, err := c.doRequest("json") 16323 if res != nil && res.StatusCode == http.StatusNotModified { 16324 if res.Body != nil { 16325 res.Body.Close() 16326 } 16327 return nil, &googleapi.Error{ 16328 Code: res.StatusCode, 16329 Header: res.Header, 16330 } 16331 } 16332 if err != nil { 16333 return nil, err 16334 } 16335 defer googleapi.CloseBody(res) 16336 if err := googleapi.CheckResponse(res); err != nil { 16337 return nil, err 16338 } 16339 ret := &GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse{ 16340 ServerResponse: googleapi.ServerResponse{ 16341 Header: res.Header, 16342 HTTPStatusCode: res.StatusCode, 16343 }, 16344 } 16345 target := &ret 16346 if err := gensupport.DecodeResponse(target, res); err != nil { 16347 return nil, err 16348 } 16349 return ret, nil 16350 // { 16351 // "description": "Returns child MeasurementProtocolSecrets under the specified parent Property.", 16352 // "flatPath": "v1alpha/properties/{propertiesId}/webDataStreams/{webDataStreamsId}/measurementProtocolSecrets", 16353 // "httpMethod": "GET", 16354 // "id": "analyticsadmin.properties.webDataStreams.measurementProtocolSecrets.list", 16355 // "parameterOrder": [ 16356 // "parent" 16357 // ], 16358 // "parameters": { 16359 // "pageSize": { 16360 // "description": "The maximum number of resources to return. If unspecified, at most 10 resources will be returned. The maximum value is 10. Higher values will be coerced to the maximum.", 16361 // "format": "int32", 16362 // "location": "query", 16363 // "type": "integer" 16364 // }, 16365 // "pageToken": { 16366 // "description": "A page token, received from a previous `ListMeasurementProtocolSecrets` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListMeasurementProtocolSecrets` must match the call that provided the page token.", 16367 // "location": "query", 16368 // "type": "string" 16369 // }, 16370 // "parent": { 16371 // "description": "Required. The resource name of the parent stream. Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent. Format: properties/{property}/webDataStreams/{webDataStream}/measurementProtocolSecrets", 16372 // "location": "path", 16373 // "pattern": "^properties/[^/]+/webDataStreams/[^/]+$", 16374 // "required": true, 16375 // "type": "string" 16376 // } 16377 // }, 16378 // "path": "v1alpha/{+parent}/measurementProtocolSecrets", 16379 // "response": { 16380 // "$ref": "GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse" 16381 // }, 16382 // "scopes": [ 16383 // "https://www.googleapis.com/auth/analytics.edit", 16384 // "https://www.googleapis.com/auth/analytics.readonly" 16385 // ] 16386 // } 16387 16388} 16389 16390// Pages invokes f for each page of results. 16391// A non-nil error returned from f will halt the iteration. 16392// The provided context supersedes any context provided to the Context method. 16393func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse) error) error { 16394 c.ctx_ = ctx 16395 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 16396 for { 16397 x, err := c.Do() 16398 if err != nil { 16399 return err 16400 } 16401 if err := f(x); err != nil { 16402 return err 16403 } 16404 if x.NextPageToken == "" { 16405 return nil 16406 } 16407 c.PageToken(x.NextPageToken) 16408 } 16409} 16410 16411// method id "analyticsadmin.properties.webDataStreams.measurementProtocolSecrets.patch": 16412 16413type PropertiesWebDataStreamsMeasurementProtocolSecretsPatchCall struct { 16414 s *Service 16415 name string 16416 googleanalyticsadminv1alphameasurementprotocolsecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret 16417 urlParams_ gensupport.URLParams 16418 ctx_ context.Context 16419 header_ http.Header 16420} 16421 16422// Patch: Updates a measurement protocol secret. 16423// 16424// - name: Output only. Resource name of this secret. This secret may be 16425// a child of any type of stream. Format: 16426// properties/{property}/webDataStreams/{webDataStream}/measurementProt 16427// ocolSecrets/{measurementProtocolSecret}. 16428func (r *PropertiesWebDataStreamsMeasurementProtocolSecretsService) Patch(name string, googleanalyticsadminv1alphameasurementprotocolsecret *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret) *PropertiesWebDataStreamsMeasurementProtocolSecretsPatchCall { 16429 c := &PropertiesWebDataStreamsMeasurementProtocolSecretsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16430 c.name = name 16431 c.googleanalyticsadminv1alphameasurementprotocolsecret = googleanalyticsadminv1alphameasurementprotocolsecret 16432 return c 16433} 16434 16435// UpdateMask sets the optional parameter "updateMask": The list of 16436// fields to be updated. Omitted fields will not be updated. 16437func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsPatchCall) UpdateMask(updateMask string) *PropertiesWebDataStreamsMeasurementProtocolSecretsPatchCall { 16438 c.urlParams_.Set("updateMask", updateMask) 16439 return c 16440} 16441 16442// Fields allows partial responses to be retrieved. See 16443// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16444// for more information. 16445func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsPatchCall) Fields(s ...googleapi.Field) *PropertiesWebDataStreamsMeasurementProtocolSecretsPatchCall { 16446 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16447 return c 16448} 16449 16450// Context sets the context to be used in this call's Do method. Any 16451// pending HTTP request will be aborted if the provided context is 16452// canceled. 16453func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsPatchCall) Context(ctx context.Context) *PropertiesWebDataStreamsMeasurementProtocolSecretsPatchCall { 16454 c.ctx_ = ctx 16455 return c 16456} 16457 16458// Header returns an http.Header that can be modified by the caller to 16459// add HTTP headers to the request. 16460func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsPatchCall) Header() http.Header { 16461 if c.header_ == nil { 16462 c.header_ = make(http.Header) 16463 } 16464 return c.header_ 16465} 16466 16467func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsPatchCall) doRequest(alt string) (*http.Response, error) { 16468 reqHeaders := make(http.Header) 16469 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210629") 16470 for k, v := range c.header_ { 16471 reqHeaders[k] = v 16472 } 16473 reqHeaders.Set("User-Agent", c.s.userAgent()) 16474 var body io.Reader = nil 16475 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphameasurementprotocolsecret) 16476 if err != nil { 16477 return nil, err 16478 } 16479 reqHeaders.Set("Content-Type", "application/json") 16480 c.urlParams_.Set("alt", alt) 16481 c.urlParams_.Set("prettyPrint", "false") 16482 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 16483 urls += "?" + c.urlParams_.Encode() 16484 req, err := http.NewRequest("PATCH", urls, body) 16485 if err != nil { 16486 return nil, err 16487 } 16488 req.Header = reqHeaders 16489 googleapi.Expand(req.URL, map[string]string{ 16490 "name": c.name, 16491 }) 16492 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16493} 16494 16495// Do executes the "analyticsadmin.properties.webDataStreams.measurementProtocolSecrets.patch" call. 16496// Exactly one of *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret 16497// or error will be non-nil. Any non-2xx status code is an error. 16498// Response headers are in either 16499// *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret.ServerResponse.H 16500// eader or (if a response was returned at all) in 16501// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16502// whether the returned error was because http.StatusNotModified was 16503// returned. 16504func (c *PropertiesWebDataStreamsMeasurementProtocolSecretsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret, error) { 16505 gensupport.SetOptions(c.urlParams_, opts...) 16506 res, err := c.doRequest("json") 16507 if res != nil && res.StatusCode == http.StatusNotModified { 16508 if res.Body != nil { 16509 res.Body.Close() 16510 } 16511 return nil, &googleapi.Error{ 16512 Code: res.StatusCode, 16513 Header: res.Header, 16514 } 16515 } 16516 if err != nil { 16517 return nil, err 16518 } 16519 defer googleapi.CloseBody(res) 16520 if err := googleapi.CheckResponse(res); err != nil { 16521 return nil, err 16522 } 16523 ret := &GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret{ 16524 ServerResponse: googleapi.ServerResponse{ 16525 Header: res.Header, 16526 HTTPStatusCode: res.StatusCode, 16527 }, 16528 } 16529 target := &ret 16530 if err := gensupport.DecodeResponse(target, res); err != nil { 16531 return nil, err 16532 } 16533 return ret, nil 16534 // { 16535 // "description": "Updates a measurement protocol secret.", 16536 // "flatPath": "v1alpha/properties/{propertiesId}/webDataStreams/{webDataStreamsId}/measurementProtocolSecrets/{measurementProtocolSecretsId}", 16537 // "httpMethod": "PATCH", 16538 // "id": "analyticsadmin.properties.webDataStreams.measurementProtocolSecrets.patch", 16539 // "parameterOrder": [ 16540 // "name" 16541 // ], 16542 // "parameters": { 16543 // "name": { 16544 // "description": "Output only. Resource name of this secret. This secret may be a child of any type of stream. Format: properties/{property}/webDataStreams/{webDataStream}/measurementProtocolSecrets/{measurementProtocolSecret}", 16545 // "location": "path", 16546 // "pattern": "^properties/[^/]+/webDataStreams/[^/]+/measurementProtocolSecrets/[^/]+$", 16547 // "required": true, 16548 // "type": "string" 16549 // }, 16550 // "updateMask": { 16551 // "description": "The list of fields to be updated. Omitted fields will not be updated.", 16552 // "format": "google-fieldmask", 16553 // "location": "query", 16554 // "type": "string" 16555 // } 16556 // }, 16557 // "path": "v1alpha/{+name}", 16558 // "request": { 16559 // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" 16560 // }, 16561 // "response": { 16562 // "$ref": "GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret" 16563 // }, 16564 // "scopes": [ 16565 // "https://www.googleapis.com/auth/analytics.edit" 16566 // ] 16567 // } 16568 16569} 16570