From 3910ec0115ac4fd4f3642844a8ea7f3f8a3c1821 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 25 Sep 2018 20:07:18 -0700 Subject: [PATCH] feat: run the generator (#1359) --- src/apis/adexchangebuyer2/v2beta1.ts | 2808 +++++++- src/apis/adexchangeseller/index.ts | 49 - src/apis/adexchangeseller/v1.1.ts | 2143 ------ src/apis/adexchangeseller/v1.ts | 1460 ---- src/apis/adexchangeseller/v2.0.ts | 1864 ----- src/apis/adexperiencereport/v1.ts | 3 +- src/apis/admin/directory_v1.ts | 8 +- src/apis/androidenterprise/v1.ts | 48 +- src/apis/appengine/v1.ts | 10 +- src/apis/appengine/v1beta.ts | 10 +- src/apis/classroom/v1.ts | 20 +- src/apis/cloudbuild/v1.ts | 5 + src/apis/cloudkms/README.md | 2 +- src/apis/cloudkms/v1.ts | 7 +- src/apis/cloudtrace/v1.ts | 5 +- src/apis/compute/alpha.ts | 93 +- src/apis/compute/beta.ts | 1058 ++- src/apis/compute/v1.ts | 8 +- src/apis/container/v1.ts | 37 + src/apis/container/v1beta1.ts | 14 +- src/apis/content/v2.ts | 424 +- src/apis/content/v2sandbox.ts | 394 +- src/apis/dataproc/v1.ts | 6177 +++++++++++------ src/apis/dataproc/v1beta2.ts | 44 +- src/apis/dialogflow/v2.ts | 83 +- src/apis/dialogflow/v2beta1.ts | 83 +- src/apis/dlp/v2.ts | 102 +- src/apis/{adexchangeseller => file}/README.md | 6 +- src/apis/file/index.ts | 29 + .../{adexchangeseller => file}/package.json | 4 +- src/apis/file/v1beta1.ts | 1532 ++++ src/apis/firestore/README.md | 2 +- src/apis/firestore/v1beta2.ts | 482 ++ src/apis/games/v1.ts | 10 + src/apis/genomics/v1.ts | 13 +- src/apis/genomics/v1alpha2.ts | 13 +- src/apis/genomics/v2alpha1.ts | 17 +- src/apis/iam/v1.ts | 4 +- src/apis/iamcredentials/v1.ts | 7 +- src/apis/iap/v1beta1.ts | 880 +++ src/apis/index.ts | 8 +- src/apis/jobs/index.ts | 9 +- src/apis/jobs/v2.ts | 22 +- src/apis/jobs/v3.ts | 55 +- src/apis/jobs/v3p1beta1.ts | 3246 +++++++++ src/apis/logging/README.md | 2 +- src/apis/logging/v2.ts | 49 +- src/apis/logging/v2beta1.ts | 17 +- src/apis/ml/v1.ts | 11 +- src/apis/monitoring/v3.ts | 2 +- src/apis/people/v1.ts | 7 +- src/apis/proximitybeacon/v1beta1.ts | 12 +- src/apis/serviceconsumermanagement/v1.ts | 439 +- src/apis/servicecontrol/v1.ts | 12 +- src/apis/servicemanagement/v1.ts | 379 +- src/apis/serviceusage/v1.ts | 439 +- src/apis/serviceusage/v1beta1.ts | 439 +- src/apis/serviceuser/v1.ts | 379 +- src/apis/speech/v1.ts | 188 +- src/apis/speech/v1beta1.ts | 113 + src/apis/sqladmin/README.md | 2 +- src/apis/sqladmin/v1beta3.ts | 3313 --------- src/apis/sqladmin/v1beta4.ts | 90 +- src/apis/storage/v1.ts | 5 +- src/apis/storage/v1beta2.ts | 5 +- src/apis/storagetransfer/v1.ts | 20 +- src/apis/streetviewpublish/v1.ts | 6 + src/apis/testing/v1.ts | 199 +- src/apis/toolresults/v1beta3.ts | 2 +- src/apis/videointelligence/index.ts | 13 +- src/apis/videointelligence/v1p1beta1.ts | 1107 +++ src/apis/vision/v1.ts | 101 +- src/apis/vision/v1p1beta1.ts | 101 +- src/apis/vision/v1p2beta1.ts | 101 +- src/index.ts | 6 +- 75 files changed, 17882 insertions(+), 12975 deletions(-) delete mode 100644 src/apis/adexchangeseller/index.ts delete mode 100644 src/apis/adexchangeseller/v1.1.ts delete mode 100644 src/apis/adexchangeseller/v1.ts delete mode 100644 src/apis/adexchangeseller/v2.0.ts rename src/apis/{adexchangeseller => file}/README.md (88%) create mode 100644 src/apis/file/index.ts rename src/apis/{adexchangeseller => file}/package.json (87%) create mode 100644 src/apis/file/v1beta1.ts create mode 100644 src/apis/jobs/v3p1beta1.ts delete mode 100644 src/apis/sqladmin/v1beta3.ts create mode 100644 src/apis/videointelligence/v1p1beta1.ts diff --git a/src/apis/adexchangebuyer2/v2beta1.ts b/src/apis/adexchangebuyer2/v2beta1.ts index 46ce37d8a99..eb382c95525 100644 --- a/src/apis/adexchangebuyer2/v2beta1.ts +++ b/src/apis/adexchangebuyer2/v2beta1.ts @@ -87,6 +87,15 @@ export namespace adexchangebuyer2_v2beta1 { */ startDate?: Schema$Date; } + /** + * Request to accept a proposal. + */ + export interface Schema$AcceptProposalRequest { + /** + * The last known client revision number of the proposal. + */ + proposalRevision?: string; + } /** * A request for associating a deal and a creative. */ @@ -96,6 +105,34 @@ export namespace adexchangebuyer2_v2beta1 { */ association?: Schema$CreativeDealAssociation; } + /** + * Request message for adding a note to a given proposal. + */ + export interface Schema$AddNoteRequest { + /** + * Details of the note to add. + */ + note?: Schema$Note; + } + /** + * Represents size of a single ad slot, or a creative. + */ + export interface Schema$AdSize { + /** + * The height of the ad slot in pixels. This field will be present only when + * size type is `PIXEL`. + */ + height?: string; + /** + * The size type of the ad slot. + */ + sizeType?: string; + /** + * The width of the ad slot in pixels. This field will be present only when + * size type is `PIXEL`. + */ + width?: string; + } /** * @OutputOnly The app type the restriction applies to for mobile device. */ @@ -172,6 +209,16 @@ export namespace adexchangebuyer2_v2beta1 { */ status?: string; } + /** + * Represents a buyer of inventory. Each buyer is identified by a unique Ad + * Exchange account ID. + */ + export interface Schema$Buyer { + /** + * Ad Exchange account ID of the buyer. + */ + accountId?: string; + } /** * The number of impressions with the specified dimension values where the * corresponding bid request or bid response was not successful, as described @@ -193,6 +240,10 @@ export namespace adexchangebuyer2_v2beta1 { */ rowDimensions?: Schema$RowDimensions; } + /** + * Request to cancel an ongoing negotiation. + */ + export interface Schema$CancelNegotiationRequest {} /** * A client resource represents a client buyer&mdash;an agency, a brand, * or an advertiser customer of the sponsor buyer. Users associated with the @@ -315,6 +366,24 @@ export namespace adexchangebuyer2_v2beta1 { */ invitationId?: string; } + /** + * Request message for indicating that the proposal's setup step is + * complete. + */ + export interface Schema$CompleteSetupRequest {} + /** + * Contains information on how a buyer or seller can be reached. + */ + export interface Schema$ContactInformation { + /** + * Email address for the contact. + */ + email?: string; + /** + * The name of the contact. + */ + name?: string; + } /** * @OutputOnly Shows any corrections that were applied to this creative. */ @@ -484,6 +553,72 @@ export namespace adexchangebuyer2_v2beta1 { */ dealsId?: string; } + /** + * Represents creative restrictions associated to Programmatic Guaranteed/ + * Preferred Deal in DFP. This doesn't apply to Private Auction and AdX + * Preferred Deals. + */ + export interface Schema$CreativeRestrictions { + /** + * The format of the environment that the creatives will be displayed in. + */ + creativeFormat?: string; + creativeSpecifications?: Schema$CreativeSpecification[]; + /** + * Skippable video ads allow viewers to skip ads after 5 seconds. + */ + skippableAdType?: string; + } + /** + * Specifies the size of the creative. + */ + export interface Schema$CreativeSize { + /** + * What formats are allowed by the publisher. If this repeated field is + * empty then all formats are allowed. E.g., if this field contains + * AllowedFormatType.AUDIO then the publisher only allows an audio ad + * (without any video). + */ + allowedFormats?: string[]; + /** + * For video creatives specifies the sizes of companion ads (if present). + * Companion sizes may be filled in only when creative_size_type = VIDEO + */ + companionSizes?: Schema$Size[]; + /** + * The creative size type. + */ + creativeSizeType?: string; + /** + * The native template for this creative. It will have a value only if + * creative_size_type = CreativeSizeType.NATIVE. @OutputOnly + */ + nativeTemplate?: string; + /** + * For regular or video creative size type, specifies the size of the + * creative + */ + size?: Schema$Size; + /** + * The type of skippable ad for this creative. It will have a value only if + * creative_size_type = CreativeSizeType.VIDEO. + */ + skippableAdType?: string; + } + /** + * Represents information for a creative that is associated with a + * Programmatic Guaranteed/Preferred Deal in DFP. + */ + export interface Schema$CreativeSpecification { + /** + * Companion sizes may be filled in only when this is a video creative. + */ + creativeCompanionSizes?: Schema$AdSize[]; + /** + * The size of the creative. + */ + creativeSize?: Schema$AdSize; + } /** * The number of bids with the specified dimension values that did not win the * auction (either were filtered pre-auction or lost the auction), as @@ -505,23 +640,39 @@ export namespace adexchangebuyer2_v2beta1 { rowDimensions?: Schema$RowDimensions; } /** - * Represents a whole calendar date, for example date of birth. The time of + * Generic targeting used for targeting dimensions that contains a list of + * included and excluded numeric IDs. + */ + export interface Schema$CriteriaTargeting { + /** + * A list of numeric IDs to be excluded. + */ + excludedCriteriaIds?: string[]; + /** + * A list of numeric IDs to be included. + */ + targetedCriteriaIds?: string[]; + } + /** + * Represents a whole or partial calendar date, e.g. a birthday. The time of * day and time zone are either specified elsewhere or are not significant. - * The date is relative to the Proleptic Gregorian Calendar. The day can be 0 - * to represent a year and month where the day is not significant, for example - * credit card expiration date. The year can be 0 to represent a month and day - * independent of year, for example anniversary date. Related types are + * The date is relative to the Proleptic Gregorian Calendar. This can + * represent: * A full date, with non-zero year, month and day values * A + * month and day value, with a zero year, e.g. an anniversary * A year on its + * own, with zero month and day values * A year and month value, with a zero + * day, e.g. a credit card expiration date Related types are * google.type.TimeOfDay and `google.protobuf.Timestamp`. */ export interface Schema$Date { /** * Day of month. Must be from 1 to 31 and valid for the year and month, or 0 - * if specifying a year/month where the day is not significant. + * if specifying a year by itself or a year and month where the day is not + * significant. */ day?: number; /** - * Month of year. Must be from 1 to 12, or 0 if specifying a date without a - * month. + * Month of year. Must be from 1 to 12, or 0 if specifying a year without a + * month and day. */ month?: number; /** @@ -530,6 +681,266 @@ export namespace adexchangebuyer2_v2beta1 { */ year?: number; } + /** + * Daypart targeting message that specifies if the ad can be shown only during + * certain parts of a day/week. + */ + export interface Schema$DayPart { + /** + * The day of the week to target. If unspecified, applicable to all days. + */ + dayOfWeek?: string; + /** + * The ending time of the day for the ad to show (minute level granularity). + * The end time is exclusive. This field is not available for filtering in + * PQL queries. + */ + endTime?: Schema$TimeOfDay; + /** + * The starting time of day for the ad to show (minute level granularity). + * The start time is inclusive. This field is not available for filtering in + * PQL queries. + */ + startTime?: Schema$TimeOfDay; + } + /** + * Specifies the day part targeting criteria. + */ + export interface Schema$DayPartTargeting { + /** + * A list of day part targeting criterion. + */ + dayParts?: Schema$DayPart[]; + /** + * The timezone to use for interpreting the day part targeting. + */ + timeZoneType?: string; + } + /** + * A deal represents a segment of inventory for displaying ads on. A proposal + * can contain multiple deals. A deal contains the terms and targeting + * information that is used for serving. + */ + export interface Schema$Deal { + /** + * Proposed flight end time of the deal. This will generally be stored in a + * granularity of a second. A value is not required for Private Auction + * deals or Preferred Deals. + */ + availableEndTime?: string; + /** + * Optional proposed flight start time of the deal. This will generally be + * stored in the granularity of one second since deal serving starts at + * seconds boundary. Any time specified with more granularity (e.g., in + * milliseconds) will be truncated towards the start of time in seconds. + */ + availableStartTime?: string; + /** + * Buyer private data (hidden from seller). + */ + buyerPrivateData?: Schema$PrivateData; + /** + * The product ID from which this deal was created. Note: This field may be + * set only when creating the resource. Modifying this field while updating + * the resource will result in an error. + */ + createProductId?: string; + /** + * Optional revision number of the product that the deal was created from. + * If present on create, and the server `product_revision` has advanced + * sinced the passed-in `create_product_revision`, an `ABORTED` error will + * be returned. Note: This field may be set only when creating the + * resource. Modifying this field while updating the resource will result in + * an error. + */ + createProductRevision?: string; + /** + * The time of the deal creation. @OutputOnly + */ + createTime?: string; + /** + * Specifies the creative pre-approval policy. @OutputOnly + */ + creativePreApprovalPolicy?: string; + /** + * Restricitions about the creatives associated with the deal (i.e. size) + * This is available for Programmatic Guaranteed/Preferred Deals in DFP. + * @OutputOnly + */ + creativeRestrictions?: Schema$CreativeRestrictions; + /** + * Specifies whether the creative is safeFrame compatible. @OutputOnly + */ + creativeSafeFrameCompatibility?: string; + /** + * A unique deal ID for the deal (server-assigned). @OutputOnly + */ + dealId?: string; + /** + * Metadata about the serving status of this deal. @OutputOnly + */ + dealServingMetadata?: Schema$DealServingMetadata; + /** + * The negotiable terms of the deal. + */ + dealTerms?: Schema$DealTerms; + /** + * The set of fields around delivery control that are interesting for a + * buyer to see but are non-negotiable. These are set by the publisher. + */ + deliveryControl?: Schema$DeliveryControl; + /** + * Description for the deal terms. + */ + description?: string; + /** + * The name of the deal. + */ + displayName?: string; + /** + * The external deal ID assigned to this deal once the deal is finalized. + * This is the deal ID that shows up in serving/reporting etc. @OutputOnly + */ + externalDealId?: string; + /** + * True, if the buyside inventory setup is complete for this deal. + * @OutputOnly + */ + isSetupComplete?: boolean; + /** + * Specifies the creative source for programmatic deals. PUBLISHER means + * creative is provided by seller and ADVERTISER means creative is provided + * by buyer. @OutputOnly + */ + programmaticCreativeSource?: string; + /** + * ID of the proposal that this deal is part of. @OutputOnly + */ + proposalId?: string; + /** + * Seller contact information for the deal. @OutputOnly + */ + sellerContacts?: Schema$ContactInformation[]; + /** + * The syndication product associated with the deal. Note: This field may + * be set only when creating the resource. Modifying this field while + * updating the resource will result in an error. + */ + syndicationProduct?: string; + /** + * Specifies the subset of inventory targeted by the deal. @OutputOnly + */ + targeting?: Schema$MarketplaceTargeting; + /** + * The shared targeting visible to buyers and sellers. Each shared targeting + * entity is AND'd together. + */ + targetingCriterion?: Schema$TargetingCriteria[]; + /** + * The time when the deal was last updated. @OutputOnly + */ + updateTime?: string; + /** + * The web property code for the seller copied over from the product. + */ + webPropertyCode?: string; + } + /** + * Tracks which parties (if any) have paused a deal. The deal is considered + * paused if either hasBuyerPaused or hasSellPaused is true. + */ + export interface Schema$DealPauseStatus { + /** + * The buyer's reason for pausing, if the buyer paused the deal. + */ + buyerPauseReason?: string; + /** + * The role of the person who first paused this deal. + */ + firstPausedBy?: string; + /** + * True, if the buyer has paused the deal unilaterally. + */ + hasBuyerPaused?: boolean; + /** + * True, if the seller has paused the deal unilaterally. + */ + hasSellerPaused?: boolean; + /** + * The seller's reason for pausing, if the seller paused the deal. + */ + sellerPauseReason?: string; + } + /** + * Message captures metadata about the serving status of a deal. + */ + export interface Schema$DealServingMetadata { + /** + * Tracks which parties (if any) have paused a deal. @OutputOnly + */ + dealPauseStatus?: Schema$DealPauseStatus; + } + /** + * The deal terms specify the details of a Product/deal. They specify things + * like price per buyer, the type of pricing model (e.g., fixed price, + * auction) and expected impressions from the publisher. + */ + export interface Schema$DealTerms { + /** + * Visibility of the URL in bid requests. (default: BRANDED) + */ + brandingType?: string; + /** + * Publisher provided description for the terms. + */ + description?: string; + /** + * Non-binding estimate of the estimated gross spend for this deal. Can be + * set by buyer or seller. + */ + estimatedGrossSpend?: Schema$Price; + /** + * Non-binding estimate of the impressions served per day. Can be set by + * buyer or seller. + */ + estimatedImpressionsPerDay?: string; + /** + * The terms for guaranteed fixed price deals. + */ + guaranteedFixedPriceTerms?: Schema$GuaranteedFixedPriceTerms; + /** + * The terms for non-guaranteed auction deals. + */ + nonGuaranteedAuctionTerms?: Schema$NonGuaranteedAuctionTerms; + /** + * The terms for non-guaranteed fixed price deals. + */ + nonGuaranteedFixedPriceTerms?: Schema$NonGuaranteedFixedPriceTerms; + /** + * The time zone name. For deals with Cost Per Day billing, defines the time + * zone used to mark the boundaries of a day. It should be an IANA TZ name, + * such as "America/Los_Angeles". For more information, see + * https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. + */ + sellerTimeZone?: string; + } + /** + * Message contains details about how the deals will be paced. + */ + export interface Schema$DeliveryControl { + /** + * Specified the creative blocking levels to be applied. @OutputOnly + */ + creativeBlockingLevel?: string; + /** + * Specifies how the impression delivery will be paced. @OutputOnly + */ + deliveryRateType?: string; + /** + * Specifies any frequency caps. @OutputOnly + */ + frequencyCaps?: Schema$FrequencyCap[]; + } /** * @OutputOnly The reason and details for a disapproval. */ @@ -687,6 +1098,66 @@ export namespace adexchangebuyer2_v2beta1 { */ timeSeriesGranularity?: string; } + /** + * Represents a list of targeted and excluded mobile application IDs that + * publishers own. Mobile application IDs are from App Store and Google Play + * Store. Android App ID, for example, com.google.android.apps.maps, can be + * found in Google Play Store URL. iOS App ID (which is a number) can be found + * at the end of iTunes store URL. First party mobile applications is either + * included or excluded. + */ + export interface Schema$FirstPartyMobileApplicationTargeting { + /** + * A list of application IDs to be excluded. + */ + excludedAppIds?: string[]; + /** + * A list of application IDs to be included. + */ + targetedAppIds?: string[]; + } + /** + * Frequency cap. + */ + export interface Schema$FrequencyCap { + /** + * The maximum number of impressions that can be served to a user within the + * specified time period. + */ + maxImpressions?: number; + /** + * The amount of time, in the units specified by time_unit_type. Defines the + * amount of time over which impressions per user are counted and capped. + */ + numTimeUnits?: number; + /** + * The time unit. Along with num_time_units defines the amount of time over + * which impressions per user are counted and capped. + */ + timeUnitType?: string; + } + /** + * Terms for Programmatic Guaranteed Deals. + */ + export interface Schema$GuaranteedFixedPriceTerms { + /** + * Fixed price for the specified buyer. + */ + fixedPrices?: Schema$PricePerBuyer[]; + /** + * Guaranteed impressions as a percentage. This is the percentage of + * guaranteed looks that the buyer is guaranteeing to buy. + */ + guaranteedImpressions?: string; + /** + * Count of guaranteed looks. Required for deal, optional for product. + */ + guaranteedLooks?: string; + /** + * Daily minimum looks for CPD deal types. + */ + minimumDailyLooks?: string; + } /** * HTML content for a creative. */ @@ -758,6 +1229,22 @@ export namespace adexchangebuyer2_v2beta1 { */ successfulResponses?: Schema$MetricValue; } + /** + * Represents the size of an ad unit that can be targeted on an ad request. It + * only applies to Private Auction, AdX Preferred Deals and Auction Packages. + * This targeting does not apply to Programmatic Guaranteed and Preferred + * Deals in DFP. + */ + export interface Schema$InventorySizeTargeting { + /** + * A list of inventory sizes to be excluded. + */ + excludedInventorySizes?: Schema$AdSize[]; + /** + * A list of inventory sizes to be included. + */ + targetedInventorySizes?: Schema$AdSize[]; + } /** * Response message for listing the metrics that are measured in number of * bids. @@ -1015,50 +1502,150 @@ export namespace adexchangebuyer2_v2beta1 { nonBillableWinningBidStatusRows?: Schema$NonBillableWinningBidStatusRow[]; } /** - * @OutputOnly The Geo criteria the restriction applies to. + * Response message for listing products visible to the buyer. */ - export interface Schema$LocationContext { + export interface Schema$ListProductsResponse { /** - * IDs representing the geo location for this context. Please refer to the - * [geo-table.csv](https://storage.googleapis.com/adx-rtb-dictionaries/geo-table.csv) - * file for different geo criteria IDs. + * List pagination support. */ - geoCriteriaIds?: number[]; + nextPageToken?: string; + /** + * The list of matching products at their head revision number. + */ + products?: Schema$Product[]; } /** - * A metric value, with an expected value and a variance; represents a count - * that may be either exact or estimated (i.e. when sampled). + * Response message for listing proposals. */ - export interface Schema$MetricValue { + export interface Schema$ListProposalsResponse { /** - * The expected value of the metric. + * Continuation token for fetching the next page of results. */ - value?: string; + nextPageToken?: string; /** - * The variance (i.e. square of the standard deviation) of the metric value. - * If value is exact, variance is 0. Can be used to calculate margin of - * error as a percentage of value, using the following formula, where Z is - * the standard constant that depends on the desired size of the confidence - * interval (e.g. for 90% confidence interval, use Z = 1.645): marginOfError - * = 100 * Z * sqrt(variance) / value + * The list of proposals. */ - variance?: string; + proposals?: Schema$Proposal[]; } /** - * Native content for a creative. + * Response message for profiles visible to the buyer. */ - export interface Schema$NativeContent { + export interface Schema$ListPublisherProfilesResponse { /** - * The name of the advertiser or sponsor, to be displayed in the ad - * creative. + * List pagination support */ - advertiserName?: string; + nextPageToken?: string; /** - * The app icon, for app download ads. + * The list of matching publisher profiles. */ - appIcon?: Schema$Image; - /** - * A long description of the ad. + publisherProfiles?: Schema$PublisherProfile[]; + } + /** + * @OutputOnly The Geo criteria the restriction applies to. + */ + export interface Schema$LocationContext { + /** + * IDs representing the geo location for this context. Please refer to the + * [geo-table.csv](https://storage.googleapis.com/adx-rtb-dictionaries/geo-table.csv) + * file for different geo criteria IDs. + */ + geoCriteriaIds?: number[]; + } + /** + * Targeting represents different criteria that can be used by advertisers to + * target ad inventory. For example, they can choose to target ad requests + * only if the user is in the US. Multiple types of targeting are always + * applied as a logical AND, unless noted otherwise. + */ + export interface Schema$MarketplaceTargeting { + /** + * Geo criteria IDs to be included/excluded. + */ + geoTargeting?: Schema$CriteriaTargeting; + /** + * Inventory sizes to be included/excluded. + */ + inventorySizeTargeting?: Schema$InventorySizeTargeting; + /** + * Placement targeting information, e.g. URL, mobile applications. + */ + placementTargeting?: Schema$PlacementTargeting; + /** + * Technology targeting information, e.g. operating system, device category. + */ + technologyTargeting?: Schema$TechnologyTargeting; + /** + * Video targeting information. + */ + videoTargeting?: Schema$VideoTargeting; + } + /** + * A metric value, with an expected value and a variance; represents a count + * that may be either exact or estimated (i.e. when sampled). + */ + export interface Schema$MetricValue { + /** + * The expected value of the metric. + */ + value?: string; + /** + * The variance (i.e. square of the standard deviation) of the metric value. + * If value is exact, variance is 0. Can be used to calculate margin of + * error as a percentage of value, using the following formula, where Z is + * the standard constant that depends on the desired size of the confidence + * interval (e.g. for 90% confidence interval, use Z = 1.645): marginOfError + * = 100 * Z * sqrt(variance) / value + */ + variance?: string; + } + /** + * Mobile application targeting settings. + */ + export interface Schema$MobileApplicationTargeting { + /** + * Publisher owned apps to be targeted or excluded by the publisher to + * display the ads in. + */ + firstPartyTargeting?: Schema$FirstPartyMobileApplicationTargeting; + } + /** + * Represents an amount of money with its currency type. + */ + export interface Schema$Money { + /** + * The 3-letter currency code defined in ISO 4217. + */ + currencyCode?: string; + /** + * Number of nano (10^-9) units of the amount. The value must be between + * -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` + * must be positive or zero. If `units` is zero, `nanos` can be positive, + * zero, or negative. If `units` is negative, `nanos` must be negative or + * zero. For example $-1.75 is represented as `units`=-1 and + * `nanos`=-750,000,000. + */ + nanos?: number; + /** + * The whole units of the amount. For example if `currencyCode` is + * `"USD"`, then 1 unit is one US dollar. + */ + units?: string; + } + /** + * Native content for a creative. + */ + export interface Schema$NativeContent { + /** + * The name of the advertiser or sponsor, to be displayed in the ad + * creative. + */ + advertiserName?: string; + /** + * The app icon, for app download ads. + */ + appIcon?: Schema$Image; + /** + * A long description of the ad. */ body?: string; /** @@ -1120,6 +1707,98 @@ export namespace adexchangebuyer2_v2beta1 { */ status?: string; } + /** + * Terms for Private Auctions. Note that Private Auctions can be created only + * by the seller, but they can be returned in a get or list request. + */ + export interface Schema$NonGuaranteedAuctionTerms { + /** + * True if open auction buyers are allowed to compete with invited buyers in + * this private auction. + */ + autoOptimizePrivateAuction?: boolean; + /** + * Reserve price for the specified buyer. + */ + reservePricesPerBuyer?: Schema$PricePerBuyer[]; + } + /** + * Terms for Preferred Deals. Note that Preferred Deals cannot be created via + * the API at this time, but can be returned in a get or list request. + */ + export interface Schema$NonGuaranteedFixedPriceTerms { + /** + * Fixed price for the specified buyer. + */ + fixedPrices?: Schema$PricePerBuyer[]; + } + /** + * A proposal may be associated to several notes. + */ + export interface Schema$Note { + /** + * The timestamp for when this note was created. @OutputOnly + */ + createTime?: string; + /** + * The role of the person (buyer/seller) creating the note. @OutputOnly + */ + creatorRole?: string; + /** + * The actual note to attach. (max-length: 1024 unicode code units) Note: + * This field may be set only when creating the resource. Modifying this + * field while updating the resource will result in an error. + */ + note?: string; + /** + * The unique ID for the note. @OutputOnly + */ + noteId?: string; + /** + * The revision number of the proposal when the note is created. @OutputOnly + */ + proposalRevision?: string; + } + /** + * Represents targeting information for operating systems. + */ + export interface Schema$OperatingSystemTargeting { + /** + * IDs of operating systems to be included/excluded. + */ + operatingSystemCriteria?: Schema$CriteriaTargeting; + /** + * IDs of operating system versions to be included/excluded. + */ + operatingSystemVersionCriteria?: Schema$CriteriaTargeting; + } + /** + * Request message to pause serving for an already-finalized proposal. + */ + export interface Schema$PauseProposalRequest { + /** + * The reason why the proposal is being paused. This human readable message + * will be displayed in the seller's UI. (Max length: 100 unicode code + * units.) + */ + reason?: string; + } + /** + * Represents targeting about where the ads can appear, e.g. certain sites or + * mobile applications. Different placement targeting types will be logically + * OR'ed. + */ + export interface Schema$PlacementTargeting { + /** + * Mobile application targeting information in a deal. This doesn't + * apply to Auction Packages. + */ + mobileApplicationTargeting?: Schema$MobileApplicationTargeting; + /** + * URLs to be included/excluded. + */ + urlTargeting?: Schema$UrlTargeting; + } /** * @OutputOnly The type of platform the restriction applies to. */ @@ -1129,6 +1808,310 @@ export namespace adexchangebuyer2_v2beta1 { */ platforms?: string[]; } + /** + * Represents a price and a pricing type for a product / deal. + */ + export interface Schema$Price { + /** + * The actual price with currency specified. + */ + amount?: Schema$Money; + /** + * The pricing type for the deal/product. (default: CPM) + */ + pricingType?: string; + } + /** + * Used to specify pricing rules for buyers/advertisers. Each PricePerBuyer in + * a product can become 0 or 1 deals. To check if there is a PricePerBuyer for + * a particular buyer or buyer/advertiser pair, we look for the most specific + * matching rule - we first look for a rule matching the buyer and advertiser, + * next a rule with the buyer but an empty advertiser list, and otherwise look + * for a matching rule where no buyer is set. + */ + export interface Schema$PricePerBuyer { + /** + * The list of advertisers for this price when associated with this buyer. + * If empty, all advertisers with this buyer pay this price. + */ + advertiserIds?: string[]; + /** + * The buyer who will pay this price. If unset, all buyers can pay this + * price (if the advertisers match, and there's no more specific rule + * matching the buyer). + */ + buyer?: Schema$Buyer; + /** + * The specified price. + */ + price?: Schema$Price; + } + /** + * Buyers are allowed to store certain types of private data in a + * proposal/deal. + */ + export interface Schema$PrivateData { + /** + * A buyer or seller specified reference ID. This can be queried in the list + * operations (max-length: 1024 unicode code units). + */ + referenceId?: string; + } + /** + * Note: this resource requires whitelisting for access. Please contact your + * account manager for access to Marketplace resources. A product is a + * segment of inventory that a seller wishes to sell. It is associated with + * certain terms and targeting information which helps the buyer know more + * about the inventory. + */ + export interface Schema$Product { + /** + * The proposed end time for the deal. The field will be truncated to the + * order of seconds during serving. + */ + availableEndTime?: string; + /** + * Inventory availability dates. The start time will be truncated to seconds + * during serving. Thus, a field specified as 3:23:34.456 (HH:mm:ss.SSS) + * will be truncated to 3:23:34 when serving. + */ + availableStartTime?: string; + /** + * Creation time. + */ + createTime?: string; + /** + * Optional contact information for the creator of this product. + */ + creatorContacts?: Schema$ContactInformation[]; + /** + * The display name for this product as set by the seller. + */ + displayName?: string; + /** + * If the creator has already signed off on the product, then the buyer can + * finalize the deal by accepting the product as is. When copying to a + * proposal, if any of the terms are changed, then auto_finalize is + * automatically set to false. + */ + hasCreatorSignedOff?: boolean; + /** + * The unique ID for the product. + */ + productId?: string; + /** + * The revision number of the product. (auto-assigned by marketplace) + */ + productRevision?: string; + /** + * An ID which can be used by the Publisher Profile API to get more + * information about the seller that created this product. + */ + publisherProfileId?: string; + /** + * Information about the seller that created this product. + */ + seller?: Schema$Seller; + /** + * The syndication product associated with the deal. + */ + syndicationProduct?: string; + /** + * Targeting that is shared between the buyer and the seller. Each targeting + * criterion has a specified key and for each key there is a list of + * inclusion value or exclusion values. + */ + targetingCriterion?: Schema$TargetingCriteria[]; + /** + * The negotiable terms of the deal. + */ + terms?: Schema$DealTerms; + /** + * Time of last update. + */ + updateTime?: string; + /** + * The web-property code for the seller. This needs to be copied as is when + * adding a new deal to a proposal. + */ + webPropertyCode?: string; + } + /** + * Note: this resource requires whitelisting for access. Please contact your + * account manager for access to Marketplace resources. Represents a proposal + * in the marketplace. A proposal is the unit of negotiation between a seller + * and a buyer and contains deals which are served. Note: you can not update, + * create, or otherwise modify Private Auction or Preferred Deals deals + * through the API. Fields are updatable unless noted otherwise. + */ + export interface Schema$Proposal { + /** + * Reference to the buyer that will get billed for this proposal. + * @OutputOnly + */ + billedBuyer?: Schema$Buyer; + /** + * Reference to the buyer on the proposal. Note: This field may be set only + * when creating the resource. Modifying this field while updating the + * resource will result in an error. + */ + buyer?: Schema$Buyer; + /** + * Contact information for the buyer. + */ + buyerContacts?: Schema$ContactInformation[]; + /** + * Private data for buyer. (hidden from seller). + */ + buyerPrivateData?: Schema$PrivateData; + /** + * The deals associated with this proposal. For Private Auction proposals + * (whose deals have NonGuaranteedAuctionTerms), there will only be one + * deal. + */ + deals?: Schema$Deal[]; + /** + * The name for the proposal. + */ + displayName?: string; + /** + * True if the proposal is being renegotiated. @OutputOnly + */ + isRenegotiating?: boolean; + /** + * True, if the buyside inventory setup is complete for this proposal. + * @OutputOnly + */ + isSetupComplete?: boolean; + /** + * The role of the last user that either updated the proposal or left a + * comment. @OutputOnly + */ + lastUpdaterOrCommentorRole?: string; + /** + * The notes associated with this proposal. @OutputOnly + */ + notes?: Schema$Note[]; + /** + * Indicates whether the buyer/seller created the proposal. @OutputOnly + */ + originatorRole?: string; + /** + * Private auction ID if this proposal is a private auction proposal. + * @OutputOnly + */ + privateAuctionId?: string; + /** + * The unique ID of the proposal. @OutputOnly + */ + proposalId?: string; + /** + * The revision number for the proposal. Each update to the proposal or the + * deal causes the proposal revision number to auto-increment. The buyer + * keeps track of the last revision number they know of and pass it in when + * making an update. If the head revision number on the server has since + * incremented, then an ABORTED error is returned during the update + * operation to let the buyer know that a subsequent update was made. + * @OutputOnly + */ + proposalRevision?: string; + /** + * The current state of the proposal. @OutputOnly + */ + proposalState?: string; + /** + * Reference to the seller on the proposal. Note: This field may be set + * only when creating the resource. Modifying this field while updating the + * resource will result in an error. + */ + seller?: Schema$Seller; + /** + * Contact information for the seller. @OutputOnly + */ + sellerContacts?: Schema$ContactInformation[]; + /** + * The time when the proposal was last revised. @OutputOnly + */ + updateTime?: string; + } + /** + * Note: this resource requires whitelisting for access. Please contact your + * account manager for access to Marketplace resources. Represents a + * publisher profile in Marketplace. All fields are read only. All string + * fields are free-form text entered by the publisher unless noted otherwise. + */ + export interface Schema$PublisherProfile { + /** + * Description on the publisher's audience. + */ + audienceDescription?: string; + /** + * Statement explaining what's unique about publisher's business, + * and why buyers should partner with the publisher. + */ + buyerPitchStatement?: string; + /** + * Contact information for direct reservation deals. This is free text + * entered by the publisher and may include information like names, phone + * numbers and email addresses. + */ + directDealsContact?: string; + /** + * Name of the publisher profile. + */ + displayName?: string; + /** + * The list of domains represented in this publisher profile. Empty if this + * is a parent profile. These are top private domains, meaning that these + * will not contain a string like "photos.google.co.uk/123", but + * will instead contain "google.co.uk". + */ + domains?: string[]; + /** + * URL to publisher's Google+ page. + */ + googlePlusUrl?: string; + /** + * A Google public URL to the logo for this publisher profile. The logo is + * stored as a PNG, JPG, or GIF image. + */ + logoUrl?: string; + /** + * URL to additional marketing and sales materials. + */ + mediaKitUrl?: string; + /** + * Overview of the publisher. + */ + overview?: string; + /** + * Contact information for programmatic deals. This is free text entered by + * the publisher and may include information like names, phone numbers and + * email addresses. + */ + programmaticDealsContact?: string; + /** + * Unique ID for publisher profile. + */ + publisherProfileId?: string; + /** + * URL to a publisher rate card. + */ + rateCardInfoUrl?: string; + /** + * URL to a sample content page. + */ + samplePageUrl?: string; + /** + * Seller of the publisher profile. + */ + seller?: Schema$Seller; + /** + * Up to three key metrics and rankings. Max 100 characters each. For + * example "#1 Mobile News Site for 20 Straight Months". + */ + topHeadlines?: string[]; + } /** * An open-ended realtime time range specified by the start timestamp. For * filter sets that specify a realtime time range RTB metrics continue to be @@ -1183,6 +2166,11 @@ export namespace adexchangebuyer2_v2beta1 { */ association?: Schema$CreativeDealAssociation; } + /** + * Request message to resume (unpause) serving for an already-finalized + * proposal. + */ + export interface Schema$ResumeProposalRequest {} /** * A response may include multiple rows, breaking down along various * dimensions. Encapsulates the values of all dimensions for a given row. @@ -1202,6 +2190,21 @@ export namespace adexchangebuyer2_v2beta1 { */ securities?: string[]; } + /** + * Represents a seller of inventory. Each seller is identified by a unique Ad + * Exchange account ID. + */ + export interface Schema$Seller { + /** + * The unique ID for the seller. The seller fills in this field. The seller + * account ID is then available to buyer in the product. + */ + accountId?: string; + /** + * Optional sub-account ID for the seller. + */ + subAccountId?: string; + } /** * The serving context for this restriction. */ @@ -1262,9 +2265,88 @@ export namespace adexchangebuyer2_v2beta1 { status?: string; } /** - * A request for stopping notifications for changes to creative Status. + * Message depicting the size of the creative. The units of width and height + * depend on the type of the targeting. */ - export interface Schema$StopWatchingCreativeRequest {} + export interface Schema$Size { + /** + * The height of the creative. + */ + height?: number; + /** + * The width of the creative + */ + width?: number; + } + /** + * A request for stopping notifications for changes to creative Status. + */ + export interface Schema$StopWatchingCreativeRequest {} + /** + * Advertisers can target different attributes of an ad slot. For example, + * they can choose to show ads only if the user is in the U.S. Such targeting + * criteria can be specified as part of Shared Targeting. + */ + export interface Schema$TargetingCriteria { + /** + * The list of values to exclude from targeting. Each value is AND'd + * together. + */ + exclusions?: Schema$TargetingValue[]; + /** + * The list of value to include as part of the targeting. Each value is + * OR'd together. + */ + inclusions?: Schema$TargetingValue[]; + /** + * The key representing the shared targeting criterion. Targeting criteria + * defined by Google ad servers will begin with GOOG_. Third parties may + * define their own keys. A list of permissible keys along with the + * acceptable values will be provided as part of the external documentation. + */ + key?: string; + } + /** + * A polymorphic targeting value used as part of Shared Targeting. + */ + export interface Schema$TargetingValue { + /** + * The creative size value to include/exclude. Filled in when key = + * GOOG_CREATIVE_SIZE + */ + creativeSizeValue?: Schema$CreativeSize; + /** + * The daypart targeting to include / exclude. Filled in when the key is + * GOOG_DAYPART_TARGETING. The definition of this targeting is derived from + * the structure used by DFP. + */ + dayPartTargetingValue?: Schema$DayPartTargeting; + /** + * The long value to include/exclude. + */ + longValue?: string; + /** + * The string value to include/exclude. + */ + stringValue?: string; + } + /** + * Represents targeting about various types of technology. + */ + export interface Schema$TechnologyTargeting { + /** + * IDs of device capabilities to be included/excluded. + */ + deviceCapabilityTargeting?: Schema$CriteriaTargeting; + /** + * IDs of device categories to be included/excluded. + */ + deviceCategoryTargeting?: Schema$CriteriaTargeting; + /** + * Operating system related targeting information. + */ + operatingSystemTargeting?: Schema$OperatingSystemTargeting; + } /** * An interval of time, with an absolute start and end. */ @@ -1280,6 +2362,48 @@ export namespace adexchangebuyer2_v2beta1 { */ startTime?: string; } + /** + * Represents a time of day. The date and time zone are either not significant + * or are specified elsewhere. An API may choose to allow leap seconds. + * Related types are google.type.Date and `google.protobuf.Timestamp`. + */ + export interface Schema$TimeOfDay { + /** + * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose + * to allow the value "24:00:00" for scenarios like business + * closing time. + */ + hours?: number; + /** + * Minutes of hour of day. Must be from 0 to 59. + */ + minutes?: number; + /** + * Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + */ + nanos?: number; + /** + * Seconds of minutes of the time. Must normally be from 0 to 59. An API may + * allow the value 60 if it allows leap-seconds. + */ + seconds?: number; + } + /** + * Represents a list of targeted and excluded URLs (e.g google.com). For + * Private Auction and AdX Preferred Deals, URLs are either included or + * excluded. For DFP Programmatic Guaranteed and Preferred Deals, this + * doesn't apply. + */ + export interface Schema$UrlTargeting { + /** + * A list of URLs to be excluded. + */ + excludedUrls?: string[]; + /** + * A list of URLs to be included. + */ + targetedUrls?: string[]; + } /** * Video content for a creative. */ @@ -1294,6 +2418,22 @@ export namespace adexchangebuyer2_v2beta1 { */ videoVastXml?: string; } + /** + * Represents targeting information about video. + */ + export interface Schema$VideoTargeting { + /** + * A list of video positions to be excluded. Position types can either be + * included or excluded (XOR). + */ + excludedPositionTypes?: string[]; + /** + * A list of video positions to be included. When the included list is + * present, the excluded list must be empty. When the excluded list is + * present, the included list must be empty. + */ + targetedPositionTypes?: string[]; + } /** * A request for watching changes to creative Status. */ @@ -1312,11 +2452,19 @@ export namespace adexchangebuyer2_v2beta1 { root: Adexchangebuyer2; clients: Resource$Accounts$Clients; creatives: Resource$Accounts$Creatives; + finalizedProposals: Resource$Accounts$Finalizedproposals; + products: Resource$Accounts$Products; + proposals: Resource$Accounts$Proposals; + publisherProfiles: Resource$Accounts$Publisherprofiles; constructor(root: Adexchangebuyer2) { this.root = root; this.getRoot.bind(this); this.clients = new Resource$Accounts$Clients(root); this.creatives = new Resource$Accounts$Creatives(root); + this.finalizedProposals = new Resource$Accounts$Finalizedproposals(root); + this.products = new Resource$Accounts$Products(root); + this.proposals = new Resource$Accounts$Proposals(root); + this.publisherProfiles = new Resource$Accounts$Publisherprofiles(root); } getRoot() { @@ -3213,35 +4361,1605 @@ export namespace adexchangebuyer2_v2beta1 { - export class Resource$Bidders { + export class Resource$Accounts$Finalizedproposals { root: Adexchangebuyer2; - accounts: Resource$Bidders$Accounts; - filterSets: Resource$Bidders$Filtersets; constructor(root: Adexchangebuyer2) { this.root = root; this.getRoot.bind(this); - this.accounts = new Resource$Bidders$Accounts(root); - this.filterSets = new Resource$Bidders$Filtersets(root); } getRoot() { return this.root; } + + + /** + * adexchangebuyer2.accounts.finalizedProposals.list + * @desc List finalized proposals, regardless if a proposal is being + * renegotiated. A filter expression (PQL query) may be specified to filter + * the results. The notes will not be returned. + * @alias adexchangebuyer2.accounts.finalizedProposals.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId Account ID of the buyer. + * @param {string=} params.filter An optional PQL filter query used to query for proposals. Nested repeated fields, such as proposal.deals.targetingCriterion, cannot be filtered. + * @param {string=} params.filterSyntax Syntax the filter is written in. Current implementation defaults to PQL but in the future it will be LIST_FILTER. + * @param {integer=} params.pageSize Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default. + * @param {string=} params.pageToken The page token as returned from ListProposalsResponse. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: Params$Resource$Accounts$Finalizedproposals$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Accounts$Finalizedproposals$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Accounts$Finalizedproposals$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Accounts$Finalizedproposals$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Accounts$Finalizedproposals$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Finalizedproposals$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://adexchangebuyer.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + '/v2beta1/accounts/{accountId}/finalizedProposals') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['accountId'], + pathParams: ['accountId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } } + export interface Params$Resource$Accounts$Finalizedproposals$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - export class Resource$Bidders$Accounts { + /** + * Account ID of the buyer. + */ + accountId?: string; + /** + * An optional PQL filter query used to query for proposals. Nested + * repeated fields, such as proposal.deals.targetingCriterion, cannot be + * filtered. + */ + filter?: string; + /** + * Syntax the filter is written in. Current implementation defaults to PQL + * but in the future it will be LIST_FILTER. + */ + filterSyntax?: string; + /** + * Requested page size. The server may return fewer results than requested. + * If unspecified, the server will pick an appropriate default. + */ + pageSize?: number; + /** + * The page token as returned from ListProposalsResponse. + */ + pageToken?: string; + } + + + export class Resource$Accounts$Products { root: Adexchangebuyer2; - filterSets: Resource$Bidders$Accounts$Filtersets; constructor(root: Adexchangebuyer2) { this.root = root; this.getRoot.bind(this); - this.filterSets = new Resource$Bidders$Accounts$Filtersets(root); } getRoot() { return this.root; } + + + /** + * adexchangebuyer2.accounts.products.get + * @desc Gets the requested product by ID. + * @alias adexchangebuyer2.accounts.products.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId Account ID of the buyer. + * @param {string} params.productId The ID for the product to get the head revision for. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Accounts$Products$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Accounts$Products$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Accounts$Products$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Accounts$Products$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Accounts$Products$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Products$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://adexchangebuyer.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + + '/v2beta1/accounts/{accountId}/products/{productId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['accountId', 'productId'], + pathParams: ['accountId', 'productId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * adexchangebuyer2.accounts.products.list + * @desc List all products visible to the buyer (optionally filtered by the + * specified PQL query). + * @alias adexchangebuyer2.accounts.products.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId Account ID of the buyer. + * @param {string=} params.filter An optional PQL query used to query for products. See https://developers.google.com/doubleclick-publishers/docs/pqlreference for documentation about PQL and examples. Nested repeated fields, such as product.targetingCriterion.inclusions, cannot be filtered. + * @param {integer=} params.pageSize Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default. + * @param {string=} params.pageToken The page token as returned from ListProductsResponse. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: Params$Resource$Accounts$Products$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Accounts$Products$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Accounts$Products$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Accounts$Products$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Accounts$Products$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Products$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://adexchangebuyer.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/accounts/{accountId}/products') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['accountId'], + pathParams: ['accountId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Accounts$Products$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Account ID of the buyer. + */ + accountId?: string; + /** + * The ID for the product to get the head revision for. + */ + productId?: string; + } + export interface Params$Resource$Accounts$Products$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Account ID of the buyer. + */ + accountId?: string; + /** + * An optional PQL query used to query for products. See + * https://developers.google.com/doubleclick-publishers/docs/pqlreference + * for documentation about PQL and examples. Nested repeated fields, such + * as product.targetingCriterion.inclusions, cannot be filtered. + */ + filter?: string; + /** + * Requested page size. The server may return fewer results than requested. + * If unspecified, the server will pick an appropriate default. + */ + pageSize?: number; + /** + * The page token as returned from ListProductsResponse. + */ + pageToken?: string; + } + + + export class Resource$Accounts$Proposals { + root: Adexchangebuyer2; + constructor(root: Adexchangebuyer2) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * adexchangebuyer2.accounts.proposals.accept + * @desc Mark the proposal as accepted at the given revision number. If the + * number does not match the server's revision number an `ABORTED` error + * message will be returned. This call updates the proposal_state from + * `PROPOSED` to `BUYER_ACCEPTED`, or from `SELLER_ACCEPTED` to `FINALIZED`. + * @alias adexchangebuyer2.accounts.proposals.accept + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId Account ID of the buyer. + * @param {string} params.proposalId The ID of the proposal to accept. + * @param {().AcceptProposalRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + accept( + params?: Params$Resource$Accounts$Proposals$Accept, + options?: MethodOptions): AxiosPromise; + accept( + params: Params$Resource$Accounts$Proposals$Accept, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + accept( + params: Params$Resource$Accounts$Proposals$Accept, + callback: BodyResponseCallback): void; + accept(callback: BodyResponseCallback): void; + accept( + paramsOrCallback?: Params$Resource$Accounts$Proposals$Accept| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Accounts$Proposals$Accept; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Proposals$Accept; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://adexchangebuyer.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/v2beta1/accounts/{accountId}/proposals/{proposalId}:accept') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['accountId', 'proposalId'], + pathParams: ['accountId', 'proposalId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * adexchangebuyer2.accounts.proposals.addNote + * @desc Create a new note and attach it to the proposal. The note is + * assigned a unique ID by the server. The proposal revision number will not + * increase when associated with a new note. + * @alias adexchangebuyer2.accounts.proposals.addNote + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId Account ID of the buyer. + * @param {string} params.proposalId The ID of the proposal to attach the note to. + * @param {().AddNoteRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + addNote( + params?: Params$Resource$Accounts$Proposals$Addnote, + options?: MethodOptions): AxiosPromise; + addNote( + params: Params$Resource$Accounts$Proposals$Addnote, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + addNote( + params: Params$Resource$Accounts$Proposals$Addnote, + callback: BodyResponseCallback): void; + addNote(callback: BodyResponseCallback): void; + addNote( + paramsOrCallback?: Params$Resource$Accounts$Proposals$Addnote| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Accounts$Proposals$Addnote; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Proposals$Addnote; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://adexchangebuyer.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/v2beta1/accounts/{accountId}/proposals/{proposalId}:addNote') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['accountId', 'proposalId'], + pathParams: ['accountId', 'proposalId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * adexchangebuyer2.accounts.proposals.cancelNegotiation + * @desc Cancel an ongoing negotiation on a proposal. This does not cancel + * or end serving for the deals if the proposal has been finalized, but only + * cancels a negotiation unilaterally. + * @alias adexchangebuyer2.accounts.proposals.cancelNegotiation + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId Account ID of the buyer. + * @param {string} params.proposalId The ID of the proposal to cancel negotiation for. + * @param {().CancelNegotiationRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + cancelNegotiation( + params?: Params$Resource$Accounts$Proposals$Cancelnegotiation, + options?: MethodOptions): AxiosPromise; + cancelNegotiation( + params: Params$Resource$Accounts$Proposals$Cancelnegotiation, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + cancelNegotiation( + params: Params$Resource$Accounts$Proposals$Cancelnegotiation, + callback: BodyResponseCallback): void; + cancelNegotiation(callback: BodyResponseCallback): void; + cancelNegotiation( + paramsOrCallback?: Params$Resource$Accounts$Proposals$Cancelnegotiation| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Accounts$Proposals$Cancelnegotiation; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Proposals$Cancelnegotiation; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://adexchangebuyer.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/v2beta1/accounts/{accountId}/proposals/{proposalId}:cancelNegotiation') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['accountId', 'proposalId'], + pathParams: ['accountId', 'proposalId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * adexchangebuyer2.accounts.proposals.completeSetup + * @desc Update the given proposal to indicate that setup has been + * completed. This method is called by the buyer when the line items have + * been created on their end for a finalized proposal and all the required + * creatives have been uploaded using the creatives API. This call updates + * the `is_setup_completed` bit on the proposal and also notifies the + * seller. The server will advance the revision number of the most recent + * proposal. + * @alias adexchangebuyer2.accounts.proposals.completeSetup + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId Account ID of the buyer. + * @param {string} params.proposalId The ID of the proposal to mark as setup completed. + * @param {().CompleteSetupRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + completeSetup( + params?: Params$Resource$Accounts$Proposals$Completesetup, + options?: MethodOptions): AxiosPromise; + completeSetup( + params: Params$Resource$Accounts$Proposals$Completesetup, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + completeSetup( + params: Params$Resource$Accounts$Proposals$Completesetup, + callback: BodyResponseCallback): void; + completeSetup(callback: BodyResponseCallback): void; + completeSetup( + paramsOrCallback?: Params$Resource$Accounts$Proposals$Completesetup| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Accounts$Proposals$Completesetup; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Proposals$Completesetup; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://adexchangebuyer.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/v2beta1/accounts/{accountId}/proposals/{proposalId}:completeSetup') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['accountId', 'proposalId'], + pathParams: ['accountId', 'proposalId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * adexchangebuyer2.accounts.proposals.create + * @desc Create the given proposal. Each created proposal and any deals it + * contains are assigned a unique ID by the server. + * @alias adexchangebuyer2.accounts.proposals.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId Account ID of the buyer. + * @param {().Proposal} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params?: Params$Resource$Accounts$Proposals$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Accounts$Proposals$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Accounts$Proposals$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Accounts$Proposals$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Accounts$Proposals$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Proposals$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://adexchangebuyer.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/accounts/{accountId}/proposals') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['accountId'], + pathParams: ['accountId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * adexchangebuyer2.accounts.proposals.get + * @desc Gets a proposal given its ID. The proposal is returned at its head + * revision. + * @alias adexchangebuyer2.accounts.proposals.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId Account ID of the buyer. + * @param {string} params.proposalId The unique ID of the proposal + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Accounts$Proposals$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Accounts$Proposals$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Accounts$Proposals$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Accounts$Proposals$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Accounts$Proposals$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Proposals$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://adexchangebuyer.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + + '/v2beta1/accounts/{accountId}/proposals/{proposalId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['accountId', 'proposalId'], + pathParams: ['accountId', 'proposalId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * adexchangebuyer2.accounts.proposals.list + * @desc List proposals. A filter expression (PQL query) may be specified to + * filter the results. To retrieve all finalized proposals, regardless if a + * proposal is being renegotiated, see the FinalizedProposals resource. Note + * that Bidder/ChildSeat relationships differ from the usual behavior. A + * Bidder account can only see its child seats' proposals by specifying the + * ChildSeat's accountId in the request path. + * @alias adexchangebuyer2.accounts.proposals.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId Account ID of the buyer. + * @param {string=} params.filter An optional PQL filter query used to query for proposals. Nested repeated fields, such as proposal.deals.targetingCriterion, cannot be filtered. + * @param {string=} params.filterSyntax Syntax the filter is written in. Current implementation defaults to PQL but in the future it will be LIST_FILTER. + * @param {integer=} params.pageSize Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default. + * @param {string=} params.pageToken The page token as returned from ListProposalsResponse. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: Params$Resource$Accounts$Proposals$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Accounts$Proposals$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Accounts$Proposals$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Accounts$Proposals$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Accounts$Proposals$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Proposals$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://adexchangebuyer.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/accounts/{accountId}/proposals') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['accountId'], + pathParams: ['accountId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * adexchangebuyer2.accounts.proposals.pause + * @desc Update the given proposal to pause serving. This method will set + * the `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to true + * for all deals in the proposal. It is a no-op to pause an already-paused + * proposal. It is an error to call PauseProposal for a proposal that is not + * finalized or renegotiating. + * @alias adexchangebuyer2.accounts.proposals.pause + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId Account ID of the buyer. + * @param {string} params.proposalId The ID of the proposal to pause. + * @param {().PauseProposalRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + pause( + params?: Params$Resource$Accounts$Proposals$Pause, + options?: MethodOptions): AxiosPromise; + pause( + params: Params$Resource$Accounts$Proposals$Pause, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + pause( + params: Params$Resource$Accounts$Proposals$Pause, + callback: BodyResponseCallback): void; + pause(callback: BodyResponseCallback): void; + pause( + paramsOrCallback?: Params$Resource$Accounts$Proposals$Pause| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Accounts$Proposals$Pause; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Proposals$Pause; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://adexchangebuyer.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/v2beta1/accounts/{accountId}/proposals/{proposalId}:pause') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['accountId', 'proposalId'], + pathParams: ['accountId', 'proposalId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * adexchangebuyer2.accounts.proposals.resume + * @desc Update the given proposal to resume serving. This method will set + * the `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to false + * for all deals in the proposal. Note that if the `has_seller_paused` bit + * is also set, serving will not resume until the seller also resumes. It + * is a no-op to resume an already-running proposal. It is an error to call + * ResumeProposal for a proposal that is not finalized or renegotiating. + * @alias adexchangebuyer2.accounts.proposals.resume + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId Account ID of the buyer. + * @param {string} params.proposalId The ID of the proposal to resume. + * @param {().ResumeProposalRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + resume( + params?: Params$Resource$Accounts$Proposals$Resume, + options?: MethodOptions): AxiosPromise; + resume( + params: Params$Resource$Accounts$Proposals$Resume, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + resume( + params: Params$Resource$Accounts$Proposals$Resume, + callback: BodyResponseCallback): void; + resume(callback: BodyResponseCallback): void; + resume( + paramsOrCallback?: Params$Resource$Accounts$Proposals$Resume| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Accounts$Proposals$Resume; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Proposals$Resume; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://adexchangebuyer.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/v2beta1/accounts/{accountId}/proposals/{proposalId}:resume') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['accountId', 'proposalId'], + pathParams: ['accountId', 'proposalId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * adexchangebuyer2.accounts.proposals.update + * @desc Update the given proposal at the client known revision number. If + * the server revision has advanced since the passed-in + * `proposal.proposal_revision`, an `ABORTED` error message will be + * returned. Only the buyer-modifiable fields of the proposal will be + * updated. Note that the deals in the proposal will be updated to match + * the passed-in copy. If a passed-in deal does not have a `deal_id`, the + * server will assign a new unique ID and create the deal. If passed-in deal + * has a `deal_id`, it will be updated to match the passed-in copy. Any + * existing deals not present in the passed-in proposal will be deleted. It + * is an error to pass in a deal with a `deal_id` not present at head. + * @alias adexchangebuyer2.accounts.proposals.update + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId Account ID of the buyer. + * @param {string} params.proposalId The unique ID of the proposal. + * @param {().Proposal} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + update( + params?: Params$Resource$Accounts$Proposals$Update, + options?: MethodOptions): AxiosPromise; + update( + params: Params$Resource$Accounts$Proposals$Update, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + update( + params: Params$Resource$Accounts$Proposals$Update, + callback: BodyResponseCallback): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: Params$Resource$Accounts$Proposals$Update| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Accounts$Proposals$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Proposals$Update; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://adexchangebuyer.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + + '/v2beta1/accounts/{accountId}/proposals/{proposalId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT' + }, + options), + params, + requiredParams: ['accountId', 'proposalId'], + pathParams: ['accountId', 'proposalId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Accounts$Proposals$Accept { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Account ID of the buyer. + */ + accountId?: string; + /** + * The ID of the proposal to accept. + */ + proposalId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AcceptProposalRequest; + } + export interface Params$Resource$Accounts$Proposals$Addnote { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Account ID of the buyer. + */ + accountId?: string; + /** + * The ID of the proposal to attach the note to. + */ + proposalId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AddNoteRequest; + } + export interface Params$Resource$Accounts$Proposals$Cancelnegotiation { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Account ID of the buyer. + */ + accountId?: string; + /** + * The ID of the proposal to cancel negotiation for. + */ + proposalId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CancelNegotiationRequest; + } + export interface Params$Resource$Accounts$Proposals$Completesetup { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Account ID of the buyer. + */ + accountId?: string; + /** + * The ID of the proposal to mark as setup completed. + */ + proposalId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CompleteSetupRequest; + } + export interface Params$Resource$Accounts$Proposals$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Account ID of the buyer. + */ + accountId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Proposal; + } + export interface Params$Resource$Accounts$Proposals$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Account ID of the buyer. + */ + accountId?: string; + /** + * The unique ID of the proposal + */ + proposalId?: string; + } + export interface Params$Resource$Accounts$Proposals$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Account ID of the buyer. + */ + accountId?: string; + /** + * An optional PQL filter query used to query for proposals. Nested + * repeated fields, such as proposal.deals.targetingCriterion, cannot be + * filtered. + */ + filter?: string; + /** + * Syntax the filter is written in. Current implementation defaults to PQL + * but in the future it will be LIST_FILTER. + */ + filterSyntax?: string; + /** + * Requested page size. The server may return fewer results than requested. + * If unspecified, the server will pick an appropriate default. + */ + pageSize?: number; + /** + * The page token as returned from ListProposalsResponse. + */ + pageToken?: string; + } + export interface Params$Resource$Accounts$Proposals$Pause { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Account ID of the buyer. + */ + accountId?: string; + /** + * The ID of the proposal to pause. + */ + proposalId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$PauseProposalRequest; + } + export interface Params$Resource$Accounts$Proposals$Resume { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Account ID of the buyer. + */ + accountId?: string; + /** + * The ID of the proposal to resume. + */ + proposalId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ResumeProposalRequest; + } + export interface Params$Resource$Accounts$Proposals$Update { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Account ID of the buyer. + */ + accountId?: string; + /** + * The unique ID of the proposal. + */ + proposalId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Proposal; + } + + + export class Resource$Accounts$Publisherprofiles { + root: Adexchangebuyer2; + constructor(root: Adexchangebuyer2) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * adexchangebuyer2.accounts.publisherProfiles.get + * @desc Gets the requested publisher profile by id. + * @alias adexchangebuyer2.accounts.publisherProfiles.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId Account ID of the buyer. + * @param {string} params.publisherProfileId The id for the publisher profile to get. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Accounts$Publisherprofiles$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Accounts$Publisherprofiles$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Accounts$Publisherprofiles$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Accounts$Publisherprofiles$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Accounts$Publisherprofiles$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Publisherprofiles$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://adexchangebuyer.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/v2beta1/accounts/{accountId}/publisherProfiles/{publisherProfileId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['accountId', 'publisherProfileId'], + pathParams: ['accountId', 'publisherProfileId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * adexchangebuyer2.accounts.publisherProfiles.list + * @desc List all publisher profiles visible to the buyer + * @alias adexchangebuyer2.accounts.publisherProfiles.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.accountId Account ID of the buyer. + * @param {integer=} params.pageSize Specify the number of results to include per page. + * @param {string=} params.pageToken The page token as return from ListPublisherProfilesResponse. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: Params$Resource$Accounts$Publisherprofiles$List, + options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Accounts$Publisherprofiles$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + list( + params: Params$Resource$Accounts$Publisherprofiles$List, + callback: BodyResponseCallback): + void; + list(callback: BodyResponseCallback): + void; + list( + paramsOrCallback?: Params$Resource$Accounts$Publisherprofiles$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Accounts$Publisherprofiles$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Publisherprofiles$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://adexchangebuyer.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/accounts/{accountId}/publisherProfiles') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['accountId'], + pathParams: ['accountId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + } + + export interface Params$Resource$Accounts$Publisherprofiles$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Account ID of the buyer. + */ + accountId?: string; + /** + * The id for the publisher profile to get. + */ + publisherProfileId?: string; + } + export interface Params$Resource$Accounts$Publisherprofiles$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Account ID of the buyer. + */ + accountId?: string; + /** + * Specify the number of results to include per page. + */ + pageSize?: number; + /** + * The page token as return from ListPublisherProfilesResponse. + */ + pageToken?: string; + } + + + + export class Resource$Bidders { + root: Adexchangebuyer2; + accounts: Resource$Bidders$Accounts; + filterSets: Resource$Bidders$Filtersets; + constructor(root: Adexchangebuyer2) { + this.root = root; + this.getRoot.bind(this); + this.accounts = new Resource$Bidders$Accounts(root); + this.filterSets = new Resource$Bidders$Filtersets(root); + } + + getRoot() { + return this.root; + } + } + + + export class Resource$Bidders$Accounts { + root: Adexchangebuyer2; + creatives: Resource$Bidders$Accounts$Creatives; + filterSets: Resource$Bidders$Accounts$Filtersets; + constructor(root: Adexchangebuyer2) { + this.root = root; + this.getRoot.bind(this); + this.creatives = new Resource$Bidders$Accounts$Creatives(root); + this.filterSets = new Resource$Bidders$Accounts$Filtersets(root); + } + + getRoot() { + return this.root; + } + } + + + export class Resource$Bidders$Accounts$Creatives { + root: Adexchangebuyer2; + constructor(root: Adexchangebuyer2) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * adexchangebuyer2.bidders.accounts.creatives.delete + * @desc Deletes a single creative. A creative is deactivated upon deletion + * and does not count against active snippet quota. A deleted creative + * should not be used in bidding (all bids with that creative will be + * rejected). + * @alias adexchangebuyer2.bidders.accounts.creatives.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.creativeId The ID of the creative to delete. + * @param {string} params.ownerName Name of the owner (bidder or account) of the creative to be deleted. For example: - For an account-level creative for the buyer account representing bidder 123: `bidders/123/accounts/123/` - For an account-level creative for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/` + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete( + params?: Params$Resource$Bidders$Accounts$Creatives$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Bidders$Accounts$Creatives$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Bidders$Accounts$Creatives$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Bidders$Accounts$Creatives$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Bidders$Accounts$Creatives$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Bidders$Accounts$Creatives$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://adexchangebuyer.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+ownerName}/creatives/{creativeId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['ownerName', 'creativeId'], + pathParams: ['creativeId', 'ownerName'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Bidders$Accounts$Creatives$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the creative to delete. + */ + creativeId?: string; + /** + * Name of the owner (bidder or account) of the creative to be deleted. For + * example: - For an account-level creative for the buyer account + * representing bidder 123: `bidders/123/accounts/123/` - For an + * account-level creative for the child seat buyer account 456 whose + * bidder is 123: `bidders/123/accounts/456/` + */ + ownerName?: string; } diff --git a/src/apis/adexchangeseller/index.ts b/src/apis/adexchangeseller/index.ts deleted file mode 100644 index a7d263ac0c3..00000000000 --- a/src/apis/adexchangeseller/index.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2018, Google, LLC. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/*! THIS FILE IS AUTO-GENERATED */ - -import {getAPI, GoogleConfigurable} from 'googleapis-common'; - -import {adexchangeseller_v1} from './v1'; -import {adexchangeseller_v1_1} from './v1.1'; -import {adexchangeseller_v2_0} from './v2.0'; - -export const VERSIONS = { - 'v1.1': adexchangeseller_v1_1.Adexchangeseller, - 'v1': adexchangeseller_v1.Adexchangeseller, - 'v2.0': adexchangeseller_v2_0.Adexchangeseller, -}; - -export function adexchangeseller(version: 'v1_1'): - adexchangeseller_v1_1.Adexchangeseller; -export function adexchangeseller(options: adexchangeseller_v1_1.Options): - adexchangeseller_v1_1.Adexchangeseller; -export function adexchangeseller(version: 'v1'): - adexchangeseller_v1.Adexchangeseller; -export function adexchangeseller(options: adexchangeseller_v1.Options): - adexchangeseller_v1.Adexchangeseller; -export function adexchangeseller(version: 'v2_0'): - adexchangeseller_v2_0.Adexchangeseller; -export function adexchangeseller(options: adexchangeseller_v2_0.Options): - adexchangeseller_v2_0.Adexchangeseller; -export function adexchangeseller< - T = adexchangeseller_v1_1.Adexchangeseller | - adexchangeseller_v1.Adexchangeseller | - adexchangeseller_v2_0.Adexchangeseller>( - this: GoogleConfigurable, - versionOrOptions: 'v1_1'| - adexchangeseller_v1_1.Options|'v1'| - adexchangeseller_v1.Options|'v2_0'|adexchangeseller_v2_0.Options) { - return getAPI('adexchangeseller', versionOrOptions, VERSIONS, this); -} diff --git a/src/apis/adexchangeseller/v1.1.ts b/src/apis/adexchangeseller/v1.1.ts deleted file mode 100644 index 7696d65d2e0..00000000000 --- a/src/apis/adexchangeseller/v1.1.ts +++ /dev/null @@ -1,2143 +0,0 @@ -/** - * Copyright 2015 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {AxiosPromise} from 'axios'; -import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; -import {BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; - -// tslint:disable: no-any -// tslint:disable: class-name -// tslint:disable: variable-name -// tslint:disable: jsdoc-format -// tslint:disable: no-namespace - -export namespace adexchangeseller_v1_1 { - export interface Options extends GlobalOptions { - version: 'v1_1'; - } - - /** - * Ad Exchange Seller API - * - * Accesses the inventory of Ad Exchange seller users and generates reports. - * - * @example - * const {google} = require('googleapis'); - * const adexchangeseller = google.adexchangeseller('v1.1'); - * - * @namespace adexchangeseller - * @type {Function} - * @version v1.1 - * @variation v1.1 - * @param {object=} options Options for Adexchangeseller - */ - export class Adexchangeseller { - _options: GlobalOptions; - google?: GoogleConfigurable; - root = this; - - accounts: Resource$Accounts; - adclients: Resource$Adclients; - adunits: Resource$Adunits; - alerts: Resource$Alerts; - customchannels: Resource$Customchannels; - metadata: Resource$Metadata; - preferreddeals: Resource$Preferreddeals; - reports: Resource$Reports; - urlchannels: Resource$Urlchannels; - - constructor(options: GlobalOptions, google?: GoogleConfigurable) { - this._options = options || {}; - this.google = google; - this.getRoot.bind(this); - - this.accounts = new Resource$Accounts(this); - this.adclients = new Resource$Adclients(this); - this.adunits = new Resource$Adunits(this); - this.alerts = new Resource$Alerts(this); - this.customchannels = new Resource$Customchannels(this); - this.metadata = new Resource$Metadata(this); - this.preferreddeals = new Resource$Preferreddeals(this); - this.reports = new Resource$Reports(this); - this.urlchannels = new Resource$Urlchannels(this); - } - - getRoot() { - return this.root; - } - } - - export interface Schema$Account { - /** - * Unique identifier of this account. - */ - id?: string; - /** - * Kind of resource this is, in this case adexchangeseller#account. - */ - kind?: string; - /** - * Name of this account. - */ - name?: string; - } - export interface Schema$AdClient { - /** - * Whether this ad client is opted in to ARC. - */ - arcOptIn?: boolean; - /** - * Unique identifier of this ad client. - */ - id?: string; - /** - * Kind of resource this is, in this case adexchangeseller#adClient. - */ - kind?: string; - /** - * This ad client's product code, which corresponds to the PRODUCT_CODE - * report dimension. - */ - productCode?: string; - /** - * Whether this ad client supports being reported on. - */ - supportsReporting?: boolean; - } - export interface Schema$AdClients { - /** - * ETag of this response for caching purposes. - */ - etag?: string; - /** - * The ad clients returned in this list response. - */ - items?: Schema$AdClient[]; - /** - * Kind of list this is, in this case adexchangeseller#adClients. - */ - kind?: string; - /** - * Continuation token used to page through ad clients. To retrieve the next - * page of results, set the next request's "pageToken" value - * to this. - */ - nextPageToken?: string; - } - export interface Schema$AdUnit { - /** - * Identity code of this ad unit, not necessarily unique across ad clients. - */ - code?: string; - /** - * Unique identifier of this ad unit. This should be considered an opaque - * identifier; it is not safe to rely on it being in any particular format. - */ - id?: string; - /** - * Kind of resource this is, in this case adexchangeseller#adUnit. - */ - kind?: string; - /** - * Name of this ad unit. - */ - name?: string; - /** - * Status of this ad unit. Possible values are: NEW: Indicates that the ad - * unit was created within the last seven days and does not yet have any - * activity associated with it. ACTIVE: Indicates that there has been - * activity on this ad unit in the last seven days. INACTIVE: Indicates - * that there has been no activity on this ad unit in the last seven days. - */ - status?: string; - } - export interface Schema$AdUnits { - /** - * ETag of this response for caching purposes. - */ - etag?: string; - /** - * The ad units returned in this list response. - */ - items?: Schema$AdUnit[]; - /** - * Kind of list this is, in this case adexchangeseller#adUnits. - */ - kind?: string; - /** - * Continuation token used to page through ad units. To retrieve the next - * page of results, set the next request's "pageToken" value - * to this. - */ - nextPageToken?: string; - } - export interface Schema$Alert { - /** - * Unique identifier of this alert. This should be considered an opaque - * identifier; it is not safe to rely on it being in any particular format. - */ - id?: string; - /** - * Kind of resource this is, in this case adexchangeseller#alert. - */ - kind?: string; - /** - * The localized alert message. - */ - message?: string; - /** - * Severity of this alert. Possible values: INFO, WARNING, SEVERE. - */ - severity?: string; - /** - * Type of this alert. Possible values: SELF_HOLD, MIGRATED_TO_BILLING3, - * ADDRESS_PIN_VERIFICATION, PHONE_PIN_VERIFICATION, CORPORATE_ENTITY, - * GRAYLISTED_PUBLISHER, API_HOLD. - */ - type?: string; - } - export interface Schema$Alerts { - /** - * The alerts returned in this list response. - */ - items?: Schema$Alert[]; - /** - * Kind of list this is, in this case adexchangeseller#alerts. - */ - kind?: string; - } - export interface Schema$CustomChannel { - /** - * Code of this custom channel, not necessarily unique across ad clients. - */ - code?: string; - /** - * Unique identifier of this custom channel. This should be considered an - * opaque identifier; it is not safe to rely on it being in any particular - * format. - */ - id?: string; - /** - * Kind of resource this is, in this case adexchangeseller#customChannel. - */ - kind?: string; - /** - * Name of this custom channel. - */ - name?: string; - /** - * The targeting information of this custom channel, if activated. - */ - targetingInfo?: any; - } - export interface Schema$CustomChannels { - /** - * ETag of this response for caching purposes. - */ - etag?: string; - /** - * The custom channels returned in this list response. - */ - items?: Schema$CustomChannel[]; - /** - * Kind of list this is, in this case adexchangeseller#customChannels. - */ - kind?: string; - /** - * Continuation token used to page through custom channels. To retrieve the - * next page of results, set the next request's "pageToken" - * value to this. - */ - nextPageToken?: string; - } - export interface Schema$Metadata { - items?: Schema$ReportingMetadataEntry[]; - /** - * Kind of list this is, in this case adexchangeseller#metadata. - */ - kind?: string; - } - export interface Schema$PreferredDeal { - /** - * The name of the advertiser this deal is for. - */ - advertiserName?: string; - /** - * The name of the buyer network this deal is for. - */ - buyerNetworkName?: string; - /** - * The currency code that applies to the fixed_cpm value. If not set then - * assumed to be USD. - */ - currencyCode?: string; - /** - * Time when this deal stops being active in seconds since the epoch (GMT). - * If not set then this deal is valid until manually disabled by the - * publisher. - */ - endTime?: string; - /** - * The fixed price for this preferred deal. In cpm micros of currency - * according to currencyCode. If set, then this preferred deal is eligible - * for the fixed price tier of buying (highest priority, pay exactly the - * configured fixed price). - */ - fixedCpm?: string; - /** - * Unique identifier of this preferred deal. - */ - id?: string; - /** - * Kind of resource this is, in this case adexchangeseller#preferredDeal. - */ - kind?: string; - /** - * Time when this deal becomes active in seconds since the epoch (GMT). If - * not set then this deal is active immediately upon creation. - */ - startTime?: string; - } - export interface Schema$PreferredDeals { - /** - * The preferred deals returned in this list response. - */ - items?: Schema$PreferredDeal[]; - /** - * Kind of list this is, in this case adexchangeseller#preferredDeals. - */ - kind?: string; - } - export interface Schema$Report { - /** - * The averages of the report. This is the same length as any other row in - * the report; cells corresponding to dimension columns are empty. - */ - averages?: string[]; - /** - * The header information of the columns requested in the report. This is a - * list of headers; one for each dimension in the request, followed by one - * for each metric in the request. - */ - headers?: any[]; - /** - * Kind this is, in this case adexchangeseller#report. - */ - kind?: string; - /** - * The output rows of the report. Each row is a list of cells; one for each - * dimension in the request, followed by one for each metric in the request. - * The dimension cells contain strings, and the metric cells contain - * numbers. - */ - rows?: string[][]; - /** - * The total number of rows matched by the report request. Fewer rows may be - * returned in the response due to being limited by the row count requested - * or the report row limit. - */ - totalMatchedRows?: string; - /** - * The totals of the report. This is the same length as any other row in the - * report; cells corresponding to dimension columns are empty. - */ - totals?: string[]; - /** - * Any warnings associated with generation of the report. - */ - warnings?: string[]; - } - export interface Schema$ReportingMetadataEntry { - /** - * For metrics this is a list of dimension IDs which the metric is - * compatible with, for dimensions it is a list of compatibility groups the - * dimension belongs to. - */ - compatibleDimensions?: string[]; - /** - * The names of the metrics the dimension or metric this reporting metadata - * entry describes is compatible with. - */ - compatibleMetrics?: string[]; - /** - * Unique identifier of this reporting metadata entry, corresponding to the - * name of the appropriate dimension or metric. - */ - id?: string; - /** - * Kind of resource this is, in this case - * adexchangeseller#reportingMetadataEntry. - */ - kind?: string; - /** - * The names of the dimensions which the dimension or metric this reporting - * metadata entry describes requires to also be present in order for the - * report to be valid. Omitting these will not cause an error or warning, - * but may result in data which cannot be correctly interpreted. - */ - requiredDimensions?: string[]; - /** - * The names of the metrics which the dimension or metric this reporting - * metadata entry describes requires to also be present in order for the - * report to be valid. Omitting these will not cause an error or warning, - * but may result in data which cannot be correctly interpreted. - */ - requiredMetrics?: string[]; - /** - * The codes of the projects supported by the dimension or metric this - * reporting metadata entry describes. - */ - supportedProducts?: string[]; - } - export interface Schema$SavedReport { - /** - * Unique identifier of this saved report. - */ - id?: string; - /** - * Kind of resource this is, in this case adexchangeseller#savedReport. - */ - kind?: string; - /** - * This saved report's name. - */ - name?: string; - } - export interface Schema$SavedReports { - /** - * ETag of this response for caching purposes. - */ - etag?: string; - /** - * The saved reports returned in this list response. - */ - items?: Schema$SavedReport[]; - /** - * Kind of list this is, in this case adexchangeseller#savedReports. - */ - kind?: string; - /** - * Continuation token used to page through saved reports. To retrieve the - * next page of results, set the next request's "pageToken" - * value to this. - */ - nextPageToken?: string; - } - export interface Schema$UrlChannel { - /** - * Unique identifier of this URL channel. This should be considered an - * opaque identifier; it is not safe to rely on it being in any particular - * format. - */ - id?: string; - /** - * Kind of resource this is, in this case adexchangeseller#urlChannel. - */ - kind?: string; - /** - * URL Pattern of this URL channel. Does not include "http://" or - * "https://". Example: www.example.com/home - */ - urlPattern?: string; - } - export interface Schema$UrlChannels { - /** - * ETag of this response for caching purposes. - */ - etag?: string; - /** - * The URL channels returned in this list response. - */ - items?: Schema$UrlChannel[]; - /** - * Kind of list this is, in this case adexchangeseller#urlChannels. - */ - kind?: string; - /** - * Continuation token used to page through URL channels. To retrieve the - * next page of results, set the next request's "pageToken" - * value to this. - */ - nextPageToken?: string; - } - - - export class Resource$Accounts { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.accounts.get - * @desc Get information about the selected Ad Exchange account. - * @alias adexchangeseller.accounts.get - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.accountId Account to get information about. Tip: 'myaccount' is a valid ID. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - get(params?: Params$Resource$Accounts$Get, - options?: MethodOptions): AxiosPromise; - get(params: Params$Resource$Accounts$Get, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - get(params: Params$Resource$Accounts$Get, - callback: BodyResponseCallback): void; - get(callback: BodyResponseCallback): void; - get(paramsOrCallback?: Params$Resource$Accounts$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Accounts$Get; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Accounts$Get; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/adexchangeseller/v1.1/accounts/{accountId}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['accountId'], - pathParams: ['accountId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Accounts$Get { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Account to get information about. Tip: 'myaccount' is a valid ID. - */ - accountId?: string; - } - - - export class Resource$Adclients { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.adclients.list - * @desc List all ad clients in this Ad Exchange account. - * @alias adexchangeseller.adclients.list - * @memberOf! () - * - * @param {object=} params Parameters for request - * @param {integer=} params.maxResults The maximum number of ad clients to include in the response, used for paging. - * @param {string=} params.pageToken A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list(params?: Params$Resource$Adclients$List, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Adclients$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Adclients$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Adclients$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Adclients$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Adclients$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/adexchangeseller/v1.1/adclients') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: [], - pathParams: [], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Adclients$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * The maximum number of ad clients to include in the response, used for - * paging. - */ - maxResults?: number; - /** - * A continuation token, used to page through ad clients. To retrieve the - * next page, set this parameter to the value of "nextPageToken" from the - * previous response. - */ - pageToken?: string; - } - - - export class Resource$Adunits { - root: Adexchangeseller; - customchannels: Resource$Adunits$Customchannels; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - this.customchannels = new Resource$Adunits$Customchannels(root); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.adunits.get - * @desc Gets the specified ad unit in the specified ad client. - * @alias adexchangeseller.adunits.get - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.adClientId Ad client for which to get the ad unit. - * @param {string} params.adUnitId Ad unit to retrieve. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - get(params?: Params$Resource$Adunits$Get, - options?: MethodOptions): AxiosPromise; - get(params: Params$Resource$Adunits$Get, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - get(params: Params$Resource$Adunits$Get, - callback: BodyResponseCallback): void; - get(callback: BodyResponseCallback): void; - get(paramsOrCallback?: Params$Resource$Adunits$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Adunits$Get; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Adunits$Get; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/adexchangeseller/v1.1/adclients/{adClientId}/adunits/{adUnitId}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['adClientId', 'adUnitId'], - pathParams: ['adClientId', 'adUnitId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * adexchangeseller.adunits.list - * @desc List all ad units in the specified ad client for this Ad Exchange - * account. - * @alias adexchangeseller.adunits.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.adClientId Ad client for which to list ad units. - * @param {boolean=} params.includeInactive Whether to include inactive ad units. Default: true. - * @param {integer=} params.maxResults The maximum number of ad units to include in the response, used for paging. - * @param {string=} params.pageToken A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list(params?: Params$Resource$Adunits$List, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Adunits$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Adunits$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Adunits$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Adunits$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Adunits$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + - '/adexchangeseller/v1.1/adclients/{adClientId}/adunits') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['adClientId'], - pathParams: ['adClientId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Adunits$Get { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Ad client for which to get the ad unit. - */ - adClientId?: string; - /** - * Ad unit to retrieve. - */ - adUnitId?: string; - } - export interface Params$Resource$Adunits$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Ad client for which to list ad units. - */ - adClientId?: string; - /** - * Whether to include inactive ad units. Default: true. - */ - includeInactive?: boolean; - /** - * The maximum number of ad units to include in the response, used for - * paging. - */ - maxResults?: number; - /** - * A continuation token, used to page through ad units. To retrieve the next - * page, set this parameter to the value of "nextPageToken" from the - * previous response. - */ - pageToken?: string; - } - - export class Resource$Adunits$Customchannels { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.adunits.customchannels.list - * @desc List all custom channels which the specified ad unit belongs to. - * @alias adexchangeseller.adunits.customchannels.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.adClientId Ad client which contains the ad unit. - * @param {string} params.adUnitId Ad unit for which to list custom channels. - * @param {integer=} params.maxResults The maximum number of custom channels to include in the response, used for paging. - * @param {string=} params.pageToken A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list( - params?: Params$Resource$Adunits$Customchannels$List, - options?: MethodOptions): AxiosPromise; - list( - params: Params$Resource$Adunits$Customchannels$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Adunits$Customchannels$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Adunits$Customchannels$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Adunits$Customchannels$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Adunits$Customchannels$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/adexchangeseller/v1.1/adclients/{adClientId}/adunits/{adUnitId}/customchannels') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['adClientId', 'adUnitId'], - pathParams: ['adClientId', 'adUnitId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Adunits$Customchannels$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Ad client which contains the ad unit. - */ - adClientId?: string; - /** - * Ad unit for which to list custom channels. - */ - adUnitId?: string; - /** - * The maximum number of custom channels to include in the response, used - * for paging. - */ - maxResults?: number; - /** - * A continuation token, used to page through custom channels. To retrieve - * the next page, set this parameter to the value of "nextPageToken" from - * the previous response. - */ - pageToken?: string; - } - - - - export class Resource$Alerts { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.alerts.list - * @desc List the alerts for this Ad Exchange account. - * @alias adexchangeseller.alerts.list - * @memberOf! () - * - * @param {object=} params Parameters for request - * @param {string=} params.locale The locale to use for translating alert messages. The account locale will be used if this is not supplied. The AdSense default (English) will be used if the supplied locale is invalid or unsupported. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list(params?: Params$Resource$Alerts$List, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Alerts$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Alerts$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Alerts$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Alerts$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Alerts$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/adexchangeseller/v1.1/alerts') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: [], - pathParams: [], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Alerts$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * The locale to use for translating alert messages. The account locale will - * be used if this is not supplied. The AdSense default (English) will be - * used if the supplied locale is invalid or unsupported. - */ - locale?: string; - } - - - export class Resource$Customchannels { - root: Adexchangeseller; - adunits: Resource$Customchannels$Adunits; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - this.adunits = new Resource$Customchannels$Adunits(root); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.customchannels.get - * @desc Get the specified custom channel from the specified ad client. - * @alias adexchangeseller.customchannels.get - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.adClientId Ad client which contains the custom channel. - * @param {string} params.customChannelId Custom channel to retrieve. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - get(params?: Params$Resource$Customchannels$Get, - options?: MethodOptions): AxiosPromise; - get(params: Params$Resource$Customchannels$Get, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - get(params: Params$Resource$Customchannels$Get, - callback: BodyResponseCallback): void; - get(callback: BodyResponseCallback): void; - get(paramsOrCallback?: Params$Resource$Customchannels$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Customchannels$Get; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Customchannels$Get; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/adexchangeseller/v1.1/adclients/{adClientId}/customchannels/{customChannelId}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['adClientId', 'customChannelId'], - pathParams: ['adClientId', 'customChannelId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * adexchangeseller.customchannels.list - * @desc List all custom channels in the specified ad client for this Ad - * Exchange account. - * @alias adexchangeseller.customchannels.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.adClientId Ad client for which to list custom channels. - * @param {integer=} params.maxResults The maximum number of custom channels to include in the response, used for paging. - * @param {string=} params.pageToken A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list(params?: Params$Resource$Customchannels$List, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Customchannels$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Customchannels$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Customchannels$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Customchannels$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Customchannels$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/adexchangeseller/v1.1/adclients/{adClientId}/customchannels') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['adClientId'], - pathParams: ['adClientId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Customchannels$Get { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Ad client which contains the custom channel. - */ - adClientId?: string; - /** - * Custom channel to retrieve. - */ - customChannelId?: string; - } - export interface Params$Resource$Customchannels$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Ad client for which to list custom channels. - */ - adClientId?: string; - /** - * The maximum number of custom channels to include in the response, used - * for paging. - */ - maxResults?: number; - /** - * A continuation token, used to page through custom channels. To retrieve - * the next page, set this parameter to the value of "nextPageToken" from - * the previous response. - */ - pageToken?: string; - } - - export class Resource$Customchannels$Adunits { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.customchannels.adunits.list - * @desc List all ad units in the specified custom channel. - * @alias adexchangeseller.customchannels.adunits.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.adClientId Ad client which contains the custom channel. - * @param {string} params.customChannelId Custom channel for which to list ad units. - * @param {boolean=} params.includeInactive Whether to include inactive ad units. Default: true. - * @param {integer=} params.maxResults The maximum number of ad units to include in the response, used for paging. - * @param {string=} params.pageToken A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list( - params?: Params$Resource$Customchannels$Adunits$List, - options?: MethodOptions): AxiosPromise; - list( - params: Params$Resource$Customchannels$Adunits$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Customchannels$Adunits$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Customchannels$Adunits$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Customchannels$Adunits$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Customchannels$Adunits$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/adexchangeseller/v1.1/adclients/{adClientId}/customchannels/{customChannelId}/adunits') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['adClientId', 'customChannelId'], - pathParams: ['adClientId', 'customChannelId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Customchannels$Adunits$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Ad client which contains the custom channel. - */ - adClientId?: string; - /** - * Custom channel for which to list ad units. - */ - customChannelId?: string; - /** - * Whether to include inactive ad units. Default: true. - */ - includeInactive?: boolean; - /** - * The maximum number of ad units to include in the response, used for - * paging. - */ - maxResults?: number; - /** - * A continuation token, used to page through ad units. To retrieve the next - * page, set this parameter to the value of "nextPageToken" from the - * previous response. - */ - pageToken?: string; - } - - - - export class Resource$Metadata { - root: Adexchangeseller; - dimensions: Resource$Metadata$Dimensions; - metrics: Resource$Metadata$Metrics; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - this.dimensions = new Resource$Metadata$Dimensions(root); - this.metrics = new Resource$Metadata$Metrics(root); - } - - getRoot() { - return this.root; - } - } - - - export class Resource$Metadata$Dimensions { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.metadata.dimensions.list - * @desc List the metadata for the dimensions available to this AdExchange - * account. - * @alias adexchangeseller.metadata.dimensions.list - * @memberOf! () - * - * @param {object=} params Parameters for request - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list( - params?: Params$Resource$Metadata$Dimensions$List, - options?: MethodOptions): AxiosPromise; - list( - params: Params$Resource$Metadata$Dimensions$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Metadata$Dimensions$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Metadata$Dimensions$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Metadata$Dimensions$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Metadata$Dimensions$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/adexchangeseller/v1.1/metadata/dimensions') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: [], - pathParams: [], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Metadata$Dimensions$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - } - - - export class Resource$Metadata$Metrics { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.metadata.metrics.list - * @desc List the metadata for the metrics available to this AdExchange - * account. - * @alias adexchangeseller.metadata.metrics.list - * @memberOf! () - * - * @param {object=} params Parameters for request - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list( - params?: Params$Resource$Metadata$Metrics$List, - options?: MethodOptions): AxiosPromise; - list( - params: Params$Resource$Metadata$Metrics$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Metadata$Metrics$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Metadata$Metrics$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Metadata$Metrics$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Metadata$Metrics$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/adexchangeseller/v1.1/metadata/metrics') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: [], - pathParams: [], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Metadata$Metrics$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - } - - - - export class Resource$Preferreddeals { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.preferreddeals.get - * @desc Get information about the selected Ad Exchange Preferred Deal. - * @alias adexchangeseller.preferreddeals.get - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.dealId Preferred deal to get information about. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - get(params?: Params$Resource$Preferreddeals$Get, - options?: MethodOptions): AxiosPromise; - get(params: Params$Resource$Preferreddeals$Get, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - get(params: Params$Resource$Preferreddeals$Get, - callback: BodyResponseCallback): void; - get(callback: BodyResponseCallback): void; - get(paramsOrCallback?: Params$Resource$Preferreddeals$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Preferreddeals$Get; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Preferreddeals$Get; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/adexchangeseller/v1.1/preferreddeals/{dealId}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['dealId'], - pathParams: ['dealId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * adexchangeseller.preferreddeals.list - * @desc List the preferred deals for this Ad Exchange account. - * @alias adexchangeseller.preferreddeals.list - * @memberOf! () - * - * @param {object=} params Parameters for request - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list(params?: Params$Resource$Preferreddeals$List, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Preferreddeals$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Preferreddeals$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Preferreddeals$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Preferreddeals$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Preferreddeals$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/adexchangeseller/v1.1/preferreddeals') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: [], - pathParams: [], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Preferreddeals$Get { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Preferred deal to get information about. - */ - dealId?: string; - } - export interface Params$Resource$Preferreddeals$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - } - - - export class Resource$Reports { - root: Adexchangeseller; - saved: Resource$Reports$Saved; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - this.saved = new Resource$Reports$Saved(root); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.reports.generate - * @desc Generate an Ad Exchange report based on the report request sent in - * the query parameters. Returns the result as JSON; to retrieve output in - * CSV format specify "alt=csv" as a query parameter. - * @alias adexchangeseller.reports.generate - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string=} params.dimension Dimensions to base the report on. - * @param {string} params.endDate End of the date range to report on in "YYYY-MM-DD" format, inclusive. - * @param {string=} params.filter Filters to be run on the report. - * @param {string=} params.locale Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. - * @param {integer=} params.maxResults The maximum number of rows of report data to return. - * @param {string=} params.metric Numeric columns to include in the report. - * @param {string=} params.sort The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. - * @param {string} params.startDate Start of the date range to report on in "YYYY-MM-DD" format, inclusive. - * @param {integer=} params.startIndex Index of the first row of report data to return. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - generate( - params?: Params$Resource$Reports$Generate, - options?: MethodOptions): AxiosPromise; - generate( - params: Params$Resource$Reports$Generate, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - generate( - params: Params$Resource$Reports$Generate, - callback: BodyResponseCallback): void; - generate(callback: BodyResponseCallback): void; - generate( - paramsOrCallback?: Params$Resource$Reports$Generate| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Reports$Generate; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Reports$Generate; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/adexchangeseller/v1.1/reports') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['startDate', 'endDate'], - pathParams: [], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Reports$Generate { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Dimensions to base the report on. - */ - dimension?: string; - /** - * End of the date range to report on in "YYYY-MM-DD" format, inclusive. - */ - endDate?: string; - /** - * Filters to be run on the report. - */ - filter?: string; - /** - * Optional locale to use for translating report output to a local language. - * Defaults to "en_US" if not specified. - */ - locale?: string; - /** - * The maximum number of rows of report data to return. - */ - maxResults?: number; - /** - * Numeric columns to include in the report. - */ - metric?: string; - /** - * The name of a dimension or metric to sort the resulting report on, - * optionally prefixed with "+" to sort ascending or "-" to sort descending. - * If no prefix is specified, the column is sorted ascending. - */ - sort?: string; - /** - * Start of the date range to report on in "YYYY-MM-DD" format, inclusive. - */ - startDate?: string; - /** - * Index of the first row of report data to return. - */ - startIndex?: number; - } - - export class Resource$Reports$Saved { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.reports.saved.generate - * @desc Generate an Ad Exchange report based on the saved report ID sent in - * the query parameters. - * @alias adexchangeseller.reports.saved.generate - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string=} params.locale Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. - * @param {integer=} params.maxResults The maximum number of rows of report data to return. - * @param {string} params.savedReportId The saved report to retrieve. - * @param {integer=} params.startIndex Index of the first row of report data to return. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - generate( - params?: Params$Resource$Reports$Saved$Generate, - options?: MethodOptions): AxiosPromise; - generate( - params: Params$Resource$Reports$Saved$Generate, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - generate( - params: Params$Resource$Reports$Saved$Generate, - callback: BodyResponseCallback): void; - generate(callback: BodyResponseCallback): void; - generate( - paramsOrCallback?: Params$Resource$Reports$Saved$Generate| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Reports$Saved$Generate; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Reports$Saved$Generate; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/adexchangeseller/v1.1/reports/{savedReportId}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['savedReportId'], - pathParams: ['savedReportId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * adexchangeseller.reports.saved.list - * @desc List all saved reports in this Ad Exchange account. - * @alias adexchangeseller.reports.saved.list - * @memberOf! () - * - * @param {object=} params Parameters for request - * @param {integer=} params.maxResults The maximum number of saved reports to include in the response, used for paging. - * @param {string=} params.pageToken A continuation token, used to page through saved reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list(params?: Params$Resource$Reports$Saved$List, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Reports$Saved$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Reports$Saved$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Reports$Saved$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Reports$Saved$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Reports$Saved$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/adexchangeseller/v1.1/reports/saved') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: [], - pathParams: [], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Reports$Saved$Generate { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Optional locale to use for translating report output to a local language. - * Defaults to "en_US" if not specified. - */ - locale?: string; - /** - * The maximum number of rows of report data to return. - */ - maxResults?: number; - /** - * The saved report to retrieve. - */ - savedReportId?: string; - /** - * Index of the first row of report data to return. - */ - startIndex?: number; - } - export interface Params$Resource$Reports$Saved$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * The maximum number of saved reports to include in the response, used for - * paging. - */ - maxResults?: number; - /** - * A continuation token, used to page through saved reports. To retrieve the - * next page, set this parameter to the value of "nextPageToken" from the - * previous response. - */ - pageToken?: string; - } - - - - export class Resource$Urlchannels { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.urlchannels.list - * @desc List all URL channels in the specified ad client for this Ad - * Exchange account. - * @alias adexchangeseller.urlchannels.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.adClientId Ad client for which to list URL channels. - * @param {integer=} params.maxResults The maximum number of URL channels to include in the response, used for paging. - * @param {string=} params.pageToken A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list(params?: Params$Resource$Urlchannels$List, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Urlchannels$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Urlchannels$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Urlchannels$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Urlchannels$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Urlchannels$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + - '/adexchangeseller/v1.1/adclients/{adClientId}/urlchannels') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['adClientId'], - pathParams: ['adClientId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Urlchannels$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Ad client for which to list URL channels. - */ - adClientId?: string; - /** - * The maximum number of URL channels to include in the response, used for - * paging. - */ - maxResults?: number; - /** - * A continuation token, used to page through URL channels. To retrieve the - * next page, set this parameter to the value of "nextPageToken" from the - * previous response. - */ - pageToken?: string; - } -} diff --git a/src/apis/adexchangeseller/v1.ts b/src/apis/adexchangeseller/v1.ts deleted file mode 100644 index 82dc16c8c0c..00000000000 --- a/src/apis/adexchangeseller/v1.ts +++ /dev/null @@ -1,1460 +0,0 @@ -/** - * Copyright 2015 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {AxiosPromise} from 'axios'; -import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; -import {BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; - -// tslint:disable: no-any -// tslint:disable: class-name -// tslint:disable: variable-name -// tslint:disable: jsdoc-format -// tslint:disable: no-namespace - -export namespace adexchangeseller_v1 { - export interface Options extends GlobalOptions { - version: 'v1'; - } - - /** - * Ad Exchange Seller API - * - * Accesses the inventory of Ad Exchange seller users and generates reports. - * - * @example - * const {google} = require('googleapis'); - * const adexchangeseller = google.adexchangeseller('v1'); - * - * @namespace adexchangeseller - * @type {Function} - * @version v1 - * @variation v1 - * @param {object=} options Options for Adexchangeseller - */ - export class Adexchangeseller { - _options: GlobalOptions; - google?: GoogleConfigurable; - root = this; - - adclients: Resource$Adclients; - adunits: Resource$Adunits; - customchannels: Resource$Customchannels; - reports: Resource$Reports; - urlchannels: Resource$Urlchannels; - - constructor(options: GlobalOptions, google?: GoogleConfigurable) { - this._options = options || {}; - this.google = google; - this.getRoot.bind(this); - - this.adclients = new Resource$Adclients(this); - this.adunits = new Resource$Adunits(this); - this.customchannels = new Resource$Customchannels(this); - this.reports = new Resource$Reports(this); - this.urlchannels = new Resource$Urlchannels(this); - } - - getRoot() { - return this.root; - } - } - - export interface Schema$AdClient { - /** - * Whether this ad client is opted in to ARC. - */ - arcOptIn?: boolean; - /** - * Unique identifier of this ad client. - */ - id?: string; - /** - * Kind of resource this is, in this case adexchangeseller#adClient. - */ - kind?: string; - /** - * This ad client's product code, which corresponds to the PRODUCT_CODE - * report dimension. - */ - productCode?: string; - /** - * Whether this ad client supports being reported on. - */ - supportsReporting?: boolean; - } - export interface Schema$AdClients { - /** - * ETag of this response for caching purposes. - */ - etag?: string; - /** - * The ad clients returned in this list response. - */ - items?: Schema$AdClient[]; - /** - * Kind of list this is, in this case adexchangeseller#adClients. - */ - kind?: string; - /** - * Continuation token used to page through ad clients. To retrieve the next - * page of results, set the next request's "pageToken" value - * to this. - */ - nextPageToken?: string; - } - export interface Schema$AdUnit { - /** - * Identity code of this ad unit, not necessarily unique across ad clients. - */ - code?: string; - /** - * Unique identifier of this ad unit. This should be considered an opaque - * identifier; it is not safe to rely on it being in any particular format. - */ - id?: string; - /** - * Kind of resource this is, in this case adexchangeseller#adUnit. - */ - kind?: string; - /** - * Name of this ad unit. - */ - name?: string; - /** - * Status of this ad unit. Possible values are: NEW: Indicates that the ad - * unit was created within the last seven days and does not yet have any - * activity associated with it. ACTIVE: Indicates that there has been - * activity on this ad unit in the last seven days. INACTIVE: Indicates - * that there has been no activity on this ad unit in the last seven days. - */ - status?: string; - } - export interface Schema$AdUnits { - /** - * ETag of this response for caching purposes. - */ - etag?: string; - /** - * The ad units returned in this list response. - */ - items?: Schema$AdUnit[]; - /** - * Kind of list this is, in this case adexchangeseller#adUnits. - */ - kind?: string; - /** - * Continuation token used to page through ad units. To retrieve the next - * page of results, set the next request's "pageToken" value - * to this. - */ - nextPageToken?: string; - } - export interface Schema$CustomChannel { - /** - * Code of this custom channel, not necessarily unique across ad clients. - */ - code?: string; - /** - * Unique identifier of this custom channel. This should be considered an - * opaque identifier; it is not safe to rely on it being in any particular - * format. - */ - id?: string; - /** - * Kind of resource this is, in this case adexchangeseller#customChannel. - */ - kind?: string; - /** - * Name of this custom channel. - */ - name?: string; - /** - * The targeting information of this custom channel, if activated. - */ - targetingInfo?: any; - } - export interface Schema$CustomChannels { - /** - * ETag of this response for caching purposes. - */ - etag?: string; - /** - * The custom channels returned in this list response. - */ - items?: Schema$CustomChannel[]; - /** - * Kind of list this is, in this case adexchangeseller#customChannels. - */ - kind?: string; - /** - * Continuation token used to page through custom channels. To retrieve the - * next page of results, set the next request's "pageToken" - * value to this. - */ - nextPageToken?: string; - } - export interface Schema$Report { - /** - * The averages of the report. This is the same length as any other row in - * the report; cells corresponding to dimension columns are empty. - */ - averages?: string[]; - /** - * The header information of the columns requested in the report. This is a - * list of headers; one for each dimension in the request, followed by one - * for each metric in the request. - */ - headers?: any[]; - /** - * Kind this is, in this case adexchangeseller#report. - */ - kind?: string; - /** - * The output rows of the report. Each row is a list of cells; one for each - * dimension in the request, followed by one for each metric in the request. - * The dimension cells contain strings, and the metric cells contain - * numbers. - */ - rows?: string[][]; - /** - * The total number of rows matched by the report request. Fewer rows may be - * returned in the response due to being limited by the row count requested - * or the report row limit. - */ - totalMatchedRows?: string; - /** - * The totals of the report. This is the same length as any other row in the - * report; cells corresponding to dimension columns are empty. - */ - totals?: string[]; - /** - * Any warnings associated with generation of the report. - */ - warnings?: string[]; - } - export interface Schema$SavedReport { - /** - * Unique identifier of this saved report. - */ - id?: string; - /** - * Kind of resource this is, in this case adexchangeseller#savedReport. - */ - kind?: string; - /** - * This saved report's name. - */ - name?: string; - } - export interface Schema$SavedReports { - /** - * ETag of this response for caching purposes. - */ - etag?: string; - /** - * The saved reports returned in this list response. - */ - items?: Schema$SavedReport[]; - /** - * Kind of list this is, in this case adexchangeseller#savedReports. - */ - kind?: string; - /** - * Continuation token used to page through saved reports. To retrieve the - * next page of results, set the next request's "pageToken" - * value to this. - */ - nextPageToken?: string; - } - export interface Schema$UrlChannel { - /** - * Unique identifier of this URL channel. This should be considered an - * opaque identifier; it is not safe to rely on it being in any particular - * format. - */ - id?: string; - /** - * Kind of resource this is, in this case adexchangeseller#urlChannel. - */ - kind?: string; - /** - * URL Pattern of this URL channel. Does not include "http://" or - * "https://". Example: www.example.com/home - */ - urlPattern?: string; - } - export interface Schema$UrlChannels { - /** - * ETag of this response for caching purposes. - */ - etag?: string; - /** - * The URL channels returned in this list response. - */ - items?: Schema$UrlChannel[]; - /** - * Kind of list this is, in this case adexchangeseller#urlChannels. - */ - kind?: string; - /** - * Continuation token used to page through URL channels. To retrieve the - * next page of results, set the next request's "pageToken" - * value to this. - */ - nextPageToken?: string; - } - - - export class Resource$Adclients { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.adclients.list - * @desc List all ad clients in this Ad Exchange account. - * @alias adexchangeseller.adclients.list - * @memberOf! () - * - * @param {object=} params Parameters for request - * @param {integer=} params.maxResults The maximum number of ad clients to include in the response, used for paging. - * @param {string=} params.pageToken A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list(params?: Params$Resource$Adclients$List, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Adclients$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Adclients$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Adclients$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Adclients$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Adclients$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/adexchangeseller/v1/adclients') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: [], - pathParams: [], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Adclients$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * The maximum number of ad clients to include in the response, used for - * paging. - */ - maxResults?: number; - /** - * A continuation token, used to page through ad clients. To retrieve the - * next page, set this parameter to the value of "nextPageToken" from the - * previous response. - */ - pageToken?: string; - } - - - export class Resource$Adunits { - root: Adexchangeseller; - customchannels: Resource$Adunits$Customchannels; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - this.customchannels = new Resource$Adunits$Customchannels(root); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.adunits.get - * @desc Gets the specified ad unit in the specified ad client. - * @alias adexchangeseller.adunits.get - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.adClientId Ad client for which to get the ad unit. - * @param {string} params.adUnitId Ad unit to retrieve. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - get(params?: Params$Resource$Adunits$Get, - options?: MethodOptions): AxiosPromise; - get(params: Params$Resource$Adunits$Get, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - get(params: Params$Resource$Adunits$Get, - callback: BodyResponseCallback): void; - get(callback: BodyResponseCallback): void; - get(paramsOrCallback?: Params$Resource$Adunits$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Adunits$Get; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Adunits$Get; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/adexchangeseller/v1/adclients/{adClientId}/adunits/{adUnitId}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['adClientId', 'adUnitId'], - pathParams: ['adClientId', 'adUnitId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * adexchangeseller.adunits.list - * @desc List all ad units in the specified ad client for this Ad Exchange - * account. - * @alias adexchangeseller.adunits.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.adClientId Ad client for which to list ad units. - * @param {boolean=} params.includeInactive Whether to include inactive ad units. Default: true. - * @param {integer=} params.maxResults The maximum number of ad units to include in the response, used for paging. - * @param {string=} params.pageToken A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list(params?: Params$Resource$Adunits$List, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Adunits$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Adunits$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Adunits$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Adunits$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Adunits$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + - '/adexchangeseller/v1/adclients/{adClientId}/adunits') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['adClientId'], - pathParams: ['adClientId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Adunits$Get { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Ad client for which to get the ad unit. - */ - adClientId?: string; - /** - * Ad unit to retrieve. - */ - adUnitId?: string; - } - export interface Params$Resource$Adunits$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Ad client for which to list ad units. - */ - adClientId?: string; - /** - * Whether to include inactive ad units. Default: true. - */ - includeInactive?: boolean; - /** - * The maximum number of ad units to include in the response, used for - * paging. - */ - maxResults?: number; - /** - * A continuation token, used to page through ad units. To retrieve the next - * page, set this parameter to the value of "nextPageToken" from the - * previous response. - */ - pageToken?: string; - } - - export class Resource$Adunits$Customchannels { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.adunits.customchannels.list - * @desc List all custom channels which the specified ad unit belongs to. - * @alias adexchangeseller.adunits.customchannels.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.adClientId Ad client which contains the ad unit. - * @param {string} params.adUnitId Ad unit for which to list custom channels. - * @param {integer=} params.maxResults The maximum number of custom channels to include in the response, used for paging. - * @param {string=} params.pageToken A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list( - params?: Params$Resource$Adunits$Customchannels$List, - options?: MethodOptions): AxiosPromise; - list( - params: Params$Resource$Adunits$Customchannels$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Adunits$Customchannels$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Adunits$Customchannels$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Adunits$Customchannels$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Adunits$Customchannels$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/adexchangeseller/v1/adclients/{adClientId}/adunits/{adUnitId}/customchannels') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['adClientId', 'adUnitId'], - pathParams: ['adClientId', 'adUnitId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Adunits$Customchannels$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Ad client which contains the ad unit. - */ - adClientId?: string; - /** - * Ad unit for which to list custom channels. - */ - adUnitId?: string; - /** - * The maximum number of custom channels to include in the response, used - * for paging. - */ - maxResults?: number; - /** - * A continuation token, used to page through custom channels. To retrieve - * the next page, set this parameter to the value of "nextPageToken" from - * the previous response. - */ - pageToken?: string; - } - - - - export class Resource$Customchannels { - root: Adexchangeseller; - adunits: Resource$Customchannels$Adunits; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - this.adunits = new Resource$Customchannels$Adunits(root); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.customchannels.get - * @desc Get the specified custom channel from the specified ad client. - * @alias adexchangeseller.customchannels.get - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.adClientId Ad client which contains the custom channel. - * @param {string} params.customChannelId Custom channel to retrieve. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - get(params?: Params$Resource$Customchannels$Get, - options?: MethodOptions): AxiosPromise; - get(params: Params$Resource$Customchannels$Get, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - get(params: Params$Resource$Customchannels$Get, - callback: BodyResponseCallback): void; - get(callback: BodyResponseCallback): void; - get(paramsOrCallback?: Params$Resource$Customchannels$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Customchannels$Get; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Customchannels$Get; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/adexchangeseller/v1/adclients/{adClientId}/customchannels/{customChannelId}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['adClientId', 'customChannelId'], - pathParams: ['adClientId', 'customChannelId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * adexchangeseller.customchannels.list - * @desc List all custom channels in the specified ad client for this Ad - * Exchange account. - * @alias adexchangeseller.customchannels.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.adClientId Ad client for which to list custom channels. - * @param {integer=} params.maxResults The maximum number of custom channels to include in the response, used for paging. - * @param {string=} params.pageToken A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list(params?: Params$Resource$Customchannels$List, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Customchannels$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Customchannels$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Customchannels$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Customchannels$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Customchannels$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/adexchangeseller/v1/adclients/{adClientId}/customchannels') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['adClientId'], - pathParams: ['adClientId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Customchannels$Get { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Ad client which contains the custom channel. - */ - adClientId?: string; - /** - * Custom channel to retrieve. - */ - customChannelId?: string; - } - export interface Params$Resource$Customchannels$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Ad client for which to list custom channels. - */ - adClientId?: string; - /** - * The maximum number of custom channels to include in the response, used - * for paging. - */ - maxResults?: number; - /** - * A continuation token, used to page through custom channels. To retrieve - * the next page, set this parameter to the value of "nextPageToken" from - * the previous response. - */ - pageToken?: string; - } - - export class Resource$Customchannels$Adunits { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.customchannels.adunits.list - * @desc List all ad units in the specified custom channel. - * @alias adexchangeseller.customchannels.adunits.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.adClientId Ad client which contains the custom channel. - * @param {string} params.customChannelId Custom channel for which to list ad units. - * @param {boolean=} params.includeInactive Whether to include inactive ad units. Default: true. - * @param {integer=} params.maxResults The maximum number of ad units to include in the response, used for paging. - * @param {string=} params.pageToken A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list( - params?: Params$Resource$Customchannels$Adunits$List, - options?: MethodOptions): AxiosPromise; - list( - params: Params$Resource$Customchannels$Adunits$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Customchannels$Adunits$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Customchannels$Adunits$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Customchannels$Adunits$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Customchannels$Adunits$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/adexchangeseller/v1/adclients/{adClientId}/customchannels/{customChannelId}/adunits') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['adClientId', 'customChannelId'], - pathParams: ['adClientId', 'customChannelId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Customchannels$Adunits$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Ad client which contains the custom channel. - */ - adClientId?: string; - /** - * Custom channel for which to list ad units. - */ - customChannelId?: string; - /** - * Whether to include inactive ad units. Default: true. - */ - includeInactive?: boolean; - /** - * The maximum number of ad units to include in the response, used for - * paging. - */ - maxResults?: number; - /** - * A continuation token, used to page through ad units. To retrieve the next - * page, set this parameter to the value of "nextPageToken" from the - * previous response. - */ - pageToken?: string; - } - - - - export class Resource$Reports { - root: Adexchangeseller; - saved: Resource$Reports$Saved; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - this.saved = new Resource$Reports$Saved(root); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.reports.generate - * @desc Generate an Ad Exchange report based on the report request sent in - * the query parameters. Returns the result as JSON; to retrieve output in - * CSV format specify "alt=csv" as a query parameter. - * @alias adexchangeseller.reports.generate - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string=} params.dimension Dimensions to base the report on. - * @param {string} params.endDate End of the date range to report on in "YYYY-MM-DD" format, inclusive. - * @param {string=} params.filter Filters to be run on the report. - * @param {string=} params.locale Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. - * @param {integer=} params.maxResults The maximum number of rows of report data to return. - * @param {string=} params.metric Numeric columns to include in the report. - * @param {string=} params.sort The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. - * @param {string} params.startDate Start of the date range to report on in "YYYY-MM-DD" format, inclusive. - * @param {integer=} params.startIndex Index of the first row of report data to return. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - generate( - params?: Params$Resource$Reports$Generate, - options?: MethodOptions): AxiosPromise; - generate( - params: Params$Resource$Reports$Generate, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - generate( - params: Params$Resource$Reports$Generate, - callback: BodyResponseCallback): void; - generate(callback: BodyResponseCallback): void; - generate( - paramsOrCallback?: Params$Resource$Reports$Generate| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Reports$Generate; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Reports$Generate; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/adexchangeseller/v1/reports') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['startDate', 'endDate'], - pathParams: [], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Reports$Generate { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Dimensions to base the report on. - */ - dimension?: string; - /** - * End of the date range to report on in "YYYY-MM-DD" format, inclusive. - */ - endDate?: string; - /** - * Filters to be run on the report. - */ - filter?: string; - /** - * Optional locale to use for translating report output to a local language. - * Defaults to "en_US" if not specified. - */ - locale?: string; - /** - * The maximum number of rows of report data to return. - */ - maxResults?: number; - /** - * Numeric columns to include in the report. - */ - metric?: string; - /** - * The name of a dimension or metric to sort the resulting report on, - * optionally prefixed with "+" to sort ascending or "-" to sort descending. - * If no prefix is specified, the column is sorted ascending. - */ - sort?: string; - /** - * Start of the date range to report on in "YYYY-MM-DD" format, inclusive. - */ - startDate?: string; - /** - * Index of the first row of report data to return. - */ - startIndex?: number; - } - - export class Resource$Reports$Saved { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.reports.saved.generate - * @desc Generate an Ad Exchange report based on the saved report ID sent in - * the query parameters. - * @alias adexchangeseller.reports.saved.generate - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string=} params.locale Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. - * @param {integer=} params.maxResults The maximum number of rows of report data to return. - * @param {string} params.savedReportId The saved report to retrieve. - * @param {integer=} params.startIndex Index of the first row of report data to return. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - generate( - params?: Params$Resource$Reports$Saved$Generate, - options?: MethodOptions): AxiosPromise; - generate( - params: Params$Resource$Reports$Saved$Generate, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - generate( - params: Params$Resource$Reports$Saved$Generate, - callback: BodyResponseCallback): void; - generate(callback: BodyResponseCallback): void; - generate( - paramsOrCallback?: Params$Resource$Reports$Saved$Generate| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Reports$Saved$Generate; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Reports$Saved$Generate; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/adexchangeseller/v1/reports/{savedReportId}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['savedReportId'], - pathParams: ['savedReportId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * adexchangeseller.reports.saved.list - * @desc List all saved reports in this Ad Exchange account. - * @alias adexchangeseller.reports.saved.list - * @memberOf! () - * - * @param {object=} params Parameters for request - * @param {integer=} params.maxResults The maximum number of saved reports to include in the response, used for paging. - * @param {string=} params.pageToken A continuation token, used to page through saved reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list(params?: Params$Resource$Reports$Saved$List, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Reports$Saved$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Reports$Saved$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Reports$Saved$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Reports$Saved$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Reports$Saved$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/adexchangeseller/v1/reports/saved') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: [], - pathParams: [], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Reports$Saved$Generate { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Optional locale to use for translating report output to a local language. - * Defaults to "en_US" if not specified. - */ - locale?: string; - /** - * The maximum number of rows of report data to return. - */ - maxResults?: number; - /** - * The saved report to retrieve. - */ - savedReportId?: string; - /** - * Index of the first row of report data to return. - */ - startIndex?: number; - } - export interface Params$Resource$Reports$Saved$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * The maximum number of saved reports to include in the response, used for - * paging. - */ - maxResults?: number; - /** - * A continuation token, used to page through saved reports. To retrieve the - * next page, set this parameter to the value of "nextPageToken" from the - * previous response. - */ - pageToken?: string; - } - - - - export class Resource$Urlchannels { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.urlchannels.list - * @desc List all URL channels in the specified ad client for this Ad - * Exchange account. - * @alias adexchangeseller.urlchannels.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.adClientId Ad client for which to list URL channels. - * @param {integer=} params.maxResults The maximum number of URL channels to include in the response, used for paging. - * @param {string=} params.pageToken A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list(params?: Params$Resource$Urlchannels$List, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Urlchannels$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Urlchannels$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Urlchannels$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Urlchannels$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Urlchannels$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + - '/adexchangeseller/v1/adclients/{adClientId}/urlchannels') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['adClientId'], - pathParams: ['adClientId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Urlchannels$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Ad client for which to list URL channels. - */ - adClientId?: string; - /** - * The maximum number of URL channels to include in the response, used for - * paging. - */ - maxResults?: number; - /** - * A continuation token, used to page through URL channels. To retrieve the - * next page, set this parameter to the value of "nextPageToken" from the - * previous response. - */ - pageToken?: string; - } -} diff --git a/src/apis/adexchangeseller/v2.0.ts b/src/apis/adexchangeseller/v2.0.ts deleted file mode 100644 index 43208a35068..00000000000 --- a/src/apis/adexchangeseller/v2.0.ts +++ /dev/null @@ -1,1864 +0,0 @@ -/** - * Copyright 2015 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {AxiosPromise} from 'axios'; -import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; -import {BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; - -// tslint:disable: no-any -// tslint:disable: class-name -// tslint:disable: variable-name -// tslint:disable: jsdoc-format -// tslint:disable: no-namespace - -export namespace adexchangeseller_v2_0 { - export interface Options extends GlobalOptions { - version: 'v2_0'; - } - - /** - * Ad Exchange Seller API - * - * Accesses the inventory of Ad Exchange seller users and generates reports. - * - * @example - * const {google} = require('googleapis'); - * const adexchangeseller = google.adexchangeseller('v2.0'); - * - * @namespace adexchangeseller - * @type {Function} - * @version v2.0 - * @variation v2.0 - * @param {object=} options Options for Adexchangeseller - */ - export class Adexchangeseller { - _options: GlobalOptions; - google?: GoogleConfigurable; - root = this; - - accounts: Resource$Accounts; - - constructor(options: GlobalOptions, google?: GoogleConfigurable) { - this._options = options || {}; - this.google = google; - this.getRoot.bind(this); - - this.accounts = new Resource$Accounts(this); - } - - getRoot() { - return this.root; - } - } - - export interface Schema$Account { - /** - * Unique identifier of this account. - */ - id?: string; - /** - * Kind of resource this is, in this case adexchangeseller#account. - */ - kind?: string; - /** - * Name of this account. - */ - name?: string; - } - export interface Schema$Accounts { - /** - * ETag of this response for caching purposes. - */ - etag?: string; - /** - * The accounts returned in this list response. - */ - items?: Schema$Account[]; - /** - * Kind of list this is, in this case adexchangeseller#accounts. - */ - kind?: string; - /** - * Continuation token used to page through accounts. To retrieve the next - * page of results, set the next request's "pageToken" value - * to this. - */ - nextPageToken?: string; - } - export interface Schema$AdClient { - /** - * Whether this ad client is opted in to ARC. - */ - arcOptIn?: boolean; - /** - * Unique identifier of this ad client. - */ - id?: string; - /** - * Kind of resource this is, in this case adexchangeseller#adClient. - */ - kind?: string; - /** - * This ad client's product code, which corresponds to the PRODUCT_CODE - * report dimension. - */ - productCode?: string; - /** - * Whether this ad client supports being reported on. - */ - supportsReporting?: boolean; - } - export interface Schema$AdClients { - /** - * ETag of this response for caching purposes. - */ - etag?: string; - /** - * The ad clients returned in this list response. - */ - items?: Schema$AdClient[]; - /** - * Kind of list this is, in this case adexchangeseller#adClients. - */ - kind?: string; - /** - * Continuation token used to page through ad clients. To retrieve the next - * page of results, set the next request's "pageToken" value - * to this. - */ - nextPageToken?: string; - } - export interface Schema$Alert { - /** - * Unique identifier of this alert. This should be considered an opaque - * identifier; it is not safe to rely on it being in any particular format. - */ - id?: string; - /** - * Kind of resource this is, in this case adexchangeseller#alert. - */ - kind?: string; - /** - * The localized alert message. - */ - message?: string; - /** - * Severity of this alert. Possible values: INFO, WARNING, SEVERE. - */ - severity?: string; - /** - * Type of this alert. Possible values: SELF_HOLD, MIGRATED_TO_BILLING3, - * ADDRESS_PIN_VERIFICATION, PHONE_PIN_VERIFICATION, CORPORATE_ENTITY, - * GRAYLISTED_PUBLISHER, API_HOLD. - */ - type?: string; - } - export interface Schema$Alerts { - /** - * The alerts returned in this list response. - */ - items?: Schema$Alert[]; - /** - * Kind of list this is, in this case adexchangeseller#alerts. - */ - kind?: string; - } - export interface Schema$CustomChannel { - /** - * Code of this custom channel, not necessarily unique across ad clients. - */ - code?: string; - /** - * Unique identifier of this custom channel. This should be considered an - * opaque identifier; it is not safe to rely on it being in any particular - * format. - */ - id?: string; - /** - * Kind of resource this is, in this case adexchangeseller#customChannel. - */ - kind?: string; - /** - * Name of this custom channel. - */ - name?: string; - /** - * The targeting information of this custom channel, if activated. - */ - targetingInfo?: any; - } - export interface Schema$CustomChannels { - /** - * ETag of this response for caching purposes. - */ - etag?: string; - /** - * The custom channels returned in this list response. - */ - items?: Schema$CustomChannel[]; - /** - * Kind of list this is, in this case adexchangeseller#customChannels. - */ - kind?: string; - /** - * Continuation token used to page through custom channels. To retrieve the - * next page of results, set the next request's "pageToken" - * value to this. - */ - nextPageToken?: string; - } - export interface Schema$Metadata { - items?: Schema$ReportingMetadataEntry[]; - /** - * Kind of list this is, in this case adexchangeseller#metadata. - */ - kind?: string; - } - export interface Schema$PreferredDeal { - /** - * The name of the advertiser this deal is for. - */ - advertiserName?: string; - /** - * The name of the buyer network this deal is for. - */ - buyerNetworkName?: string; - /** - * The currency code that applies to the fixed_cpm value. If not set then - * assumed to be USD. - */ - currencyCode?: string; - /** - * Time when this deal stops being active in seconds since the epoch (GMT). - * If not set then this deal is valid until manually disabled by the - * publisher. - */ - endTime?: string; - /** - * The fixed price for this preferred deal. In cpm micros of currency - * according to currencyCode. If set, then this preferred deal is eligible - * for the fixed price tier of buying (highest priority, pay exactly the - * configured fixed price). - */ - fixedCpm?: string; - /** - * Unique identifier of this preferred deal. - */ - id?: string; - /** - * Kind of resource this is, in this case adexchangeseller#preferredDeal. - */ - kind?: string; - /** - * Time when this deal becomes active in seconds since the epoch (GMT). If - * not set then this deal is active immediately upon creation. - */ - startTime?: string; - } - export interface Schema$PreferredDeals { - /** - * The preferred deals returned in this list response. - */ - items?: Schema$PreferredDeal[]; - /** - * Kind of list this is, in this case adexchangeseller#preferredDeals. - */ - kind?: string; - } - export interface Schema$Report { - /** - * The averages of the report. This is the same length as any other row in - * the report; cells corresponding to dimension columns are empty. - */ - averages?: string[]; - /** - * The header information of the columns requested in the report. This is a - * list of headers; one for each dimension in the request, followed by one - * for each metric in the request. - */ - headers?: any[]; - /** - * Kind this is, in this case adexchangeseller#report. - */ - kind?: string; - /** - * The output rows of the report. Each row is a list of cells; one for each - * dimension in the request, followed by one for each metric in the request. - * The dimension cells contain strings, and the metric cells contain - * numbers. - */ - rows?: string[][]; - /** - * The total number of rows matched by the report request. Fewer rows may be - * returned in the response due to being limited by the row count requested - * or the report row limit. - */ - totalMatchedRows?: string; - /** - * The totals of the report. This is the same length as any other row in the - * report; cells corresponding to dimension columns are empty. - */ - totals?: string[]; - /** - * Any warnings associated with generation of the report. - */ - warnings?: string[]; - } - export interface Schema$ReportingMetadataEntry { - /** - * For metrics this is a list of dimension IDs which the metric is - * compatible with, for dimensions it is a list of compatibility groups the - * dimension belongs to. - */ - compatibleDimensions?: string[]; - /** - * The names of the metrics the dimension or metric this reporting metadata - * entry describes is compatible with. - */ - compatibleMetrics?: string[]; - /** - * Unique identifier of this reporting metadata entry, corresponding to the - * name of the appropriate dimension or metric. - */ - id?: string; - /** - * Kind of resource this is, in this case - * adexchangeseller#reportingMetadataEntry. - */ - kind?: string; - /** - * The names of the dimensions which the dimension or metric this reporting - * metadata entry describes requires to also be present in order for the - * report to be valid. Omitting these will not cause an error or warning, - * but may result in data which cannot be correctly interpreted. - */ - requiredDimensions?: string[]; - /** - * The names of the metrics which the dimension or metric this reporting - * metadata entry describes requires to also be present in order for the - * report to be valid. Omitting these will not cause an error or warning, - * but may result in data which cannot be correctly interpreted. - */ - requiredMetrics?: string[]; - /** - * The codes of the projects supported by the dimension or metric this - * reporting metadata entry describes. - */ - supportedProducts?: string[]; - } - export interface Schema$SavedReport { - /** - * Unique identifier of this saved report. - */ - id?: string; - /** - * Kind of resource this is, in this case adexchangeseller#savedReport. - */ - kind?: string; - /** - * This saved report's name. - */ - name?: string; - } - export interface Schema$SavedReports { - /** - * ETag of this response for caching purposes. - */ - etag?: string; - /** - * The saved reports returned in this list response. - */ - items?: Schema$SavedReport[]; - /** - * Kind of list this is, in this case adexchangeseller#savedReports. - */ - kind?: string; - /** - * Continuation token used to page through saved reports. To retrieve the - * next page of results, set the next request's "pageToken" - * value to this. - */ - nextPageToken?: string; - } - export interface Schema$UrlChannel { - /** - * Unique identifier of this URL channel. This should be considered an - * opaque identifier; it is not safe to rely on it being in any particular - * format. - */ - id?: string; - /** - * Kind of resource this is, in this case adexchangeseller#urlChannel. - */ - kind?: string; - /** - * URL Pattern of this URL channel. Does not include "http://" or - * "https://". Example: www.example.com/home - */ - urlPattern?: string; - } - export interface Schema$UrlChannels { - /** - * ETag of this response for caching purposes. - */ - etag?: string; - /** - * The URL channels returned in this list response. - */ - items?: Schema$UrlChannel[]; - /** - * Kind of list this is, in this case adexchangeseller#urlChannels. - */ - kind?: string; - /** - * Continuation token used to page through URL channels. To retrieve the - * next page of results, set the next request's "pageToken" - * value to this. - */ - nextPageToken?: string; - } - - - export class Resource$Accounts { - root: Adexchangeseller; - adclients: Resource$Accounts$Adclients; - alerts: Resource$Accounts$Alerts; - customchannels: Resource$Accounts$Customchannels; - metadata: Resource$Accounts$Metadata; - preferreddeals: Resource$Accounts$Preferreddeals; - reports: Resource$Accounts$Reports; - urlchannels: Resource$Accounts$Urlchannels; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - this.adclients = new Resource$Accounts$Adclients(root); - this.alerts = new Resource$Accounts$Alerts(root); - this.customchannels = new Resource$Accounts$Customchannels(root); - this.metadata = new Resource$Accounts$Metadata(root); - this.preferreddeals = new Resource$Accounts$Preferreddeals(root); - this.reports = new Resource$Accounts$Reports(root); - this.urlchannels = new Resource$Accounts$Urlchannels(root); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.accounts.get - * @desc Get information about the selected Ad Exchange account. - * @alias adexchangeseller.accounts.get - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.accountId Account to get information about. Tip: 'myaccount' is a valid ID. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - get(params?: Params$Resource$Accounts$Get, - options?: MethodOptions): AxiosPromise; - get(params: Params$Resource$Accounts$Get, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - get(params: Params$Resource$Accounts$Get, - callback: BodyResponseCallback): void; - get(callback: BodyResponseCallback): void; - get(paramsOrCallback?: Params$Resource$Accounts$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Accounts$Get; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Accounts$Get; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/adexchangeseller/v2.0/accounts/{accountId}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['accountId'], - pathParams: ['accountId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * adexchangeseller.accounts.list - * @desc List all accounts available to this Ad Exchange account. - * @alias adexchangeseller.accounts.list - * @memberOf! () - * - * @param {object=} params Parameters for request - * @param {integer=} params.maxResults The maximum number of accounts to include in the response, used for paging. - * @param {string=} params.pageToken A continuation token, used to page through accounts. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list(params?: Params$Resource$Accounts$List, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Accounts$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Accounts$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Accounts$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Accounts$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Accounts$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/adexchangeseller/v2.0/accounts') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: [], - pathParams: [], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Accounts$Get { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Account to get information about. Tip: 'myaccount' is a valid ID. - */ - accountId?: string; - } - export interface Params$Resource$Accounts$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * The maximum number of accounts to include in the response, used for - * paging. - */ - maxResults?: number; - /** - * A continuation token, used to page through accounts. To retrieve the next - * page, set this parameter to the value of "nextPageToken" from the - * previous response. - */ - pageToken?: string; - } - - export class Resource$Accounts$Adclients { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.accounts.adclients.list - * @desc List all ad clients in this Ad Exchange account. - * @alias adexchangeseller.accounts.adclients.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.accountId Account to which the ad client belongs. - * @param {integer=} params.maxResults The maximum number of ad clients to include in the response, used for paging. - * @param {string=} params.pageToken A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list( - params?: Params$Resource$Accounts$Adclients$List, - options?: MethodOptions): AxiosPromise; - list( - params: Params$Resource$Accounts$Adclients$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Accounts$Adclients$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Accounts$Adclients$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Accounts$Adclients$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Accounts$Adclients$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + - '/adexchangeseller/v2.0/accounts/{accountId}/adclients') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['accountId'], - pathParams: ['accountId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Accounts$Adclients$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Account to which the ad client belongs. - */ - accountId?: string; - /** - * The maximum number of ad clients to include in the response, used for - * paging. - */ - maxResults?: number; - /** - * A continuation token, used to page through ad clients. To retrieve the - * next page, set this parameter to the value of "nextPageToken" from the - * previous response. - */ - pageToken?: string; - } - - - export class Resource$Accounts$Alerts { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.accounts.alerts.list - * @desc List the alerts for this Ad Exchange account. - * @alias adexchangeseller.accounts.alerts.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.accountId Account owning the alerts. - * @param {string=} params.locale The locale to use for translating alert messages. The account locale will be used if this is not supplied. The AdSense default (English) will be used if the supplied locale is invalid or unsupported. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list( - params?: Params$Resource$Accounts$Alerts$List, - options?: MethodOptions): AxiosPromise; - list( - params: Params$Resource$Accounts$Alerts$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Accounts$Alerts$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Accounts$Alerts$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Accounts$Alerts$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Accounts$Alerts$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + - '/adexchangeseller/v2.0/accounts/{accountId}/alerts') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['accountId'], - pathParams: ['accountId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Accounts$Alerts$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Account owning the alerts. - */ - accountId?: string; - /** - * The locale to use for translating alert messages. The account locale will - * be used if this is not supplied. The AdSense default (English) will be - * used if the supplied locale is invalid or unsupported. - */ - locale?: string; - } - - - export class Resource$Accounts$Customchannels { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.accounts.customchannels.get - * @desc Get the specified custom channel from the specified ad client. - * @alias adexchangeseller.accounts.customchannels.get - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.accountId Account to which the ad client belongs. - * @param {string} params.adClientId Ad client which contains the custom channel. - * @param {string} params.customChannelId Custom channel to retrieve. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - get(params?: Params$Resource$Accounts$Customchannels$Get, - options?: MethodOptions): AxiosPromise; - get(params: Params$Resource$Accounts$Customchannels$Get, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - get(params: Params$Resource$Accounts$Customchannels$Get, - callback: BodyResponseCallback): void; - get(callback: BodyResponseCallback): void; - get(paramsOrCallback?: Params$Resource$Accounts$Customchannels$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Accounts$Customchannels$Get; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Accounts$Customchannels$Get; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/adexchangeseller/v2.0/accounts/{accountId}/adclients/{adClientId}/customchannels/{customChannelId}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['accountId', 'adClientId', 'customChannelId'], - pathParams: ['accountId', 'adClientId', 'customChannelId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * adexchangeseller.accounts.customchannels.list - * @desc List all custom channels in the specified ad client for this Ad - * Exchange account. - * @alias adexchangeseller.accounts.customchannels.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.accountId Account to which the ad client belongs. - * @param {string} params.adClientId Ad client for which to list custom channels. - * @param {integer=} params.maxResults The maximum number of custom channels to include in the response, used for paging. - * @param {string=} params.pageToken A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list( - params?: Params$Resource$Accounts$Customchannels$List, - options?: MethodOptions): AxiosPromise; - list( - params: Params$Resource$Accounts$Customchannels$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Accounts$Customchannels$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Accounts$Customchannels$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Accounts$Customchannels$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Accounts$Customchannels$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/adexchangeseller/v2.0/accounts/{accountId}/adclients/{adClientId}/customchannels') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['accountId', 'adClientId'], - pathParams: ['accountId', 'adClientId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Accounts$Customchannels$Get { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Account to which the ad client belongs. - */ - accountId?: string; - /** - * Ad client which contains the custom channel. - */ - adClientId?: string; - /** - * Custom channel to retrieve. - */ - customChannelId?: string; - } - export interface Params$Resource$Accounts$Customchannels$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Account to which the ad client belongs. - */ - accountId?: string; - /** - * Ad client for which to list custom channels. - */ - adClientId?: string; - /** - * The maximum number of custom channels to include in the response, used - * for paging. - */ - maxResults?: number; - /** - * A continuation token, used to page through custom channels. To retrieve - * the next page, set this parameter to the value of "nextPageToken" from - * the previous response. - */ - pageToken?: string; - } - - - export class Resource$Accounts$Metadata { - root: Adexchangeseller; - dimensions: Resource$Accounts$Metadata$Dimensions; - metrics: Resource$Accounts$Metadata$Metrics; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - this.dimensions = new Resource$Accounts$Metadata$Dimensions(root); - this.metrics = new Resource$Accounts$Metadata$Metrics(root); - } - - getRoot() { - return this.root; - } - } - - - export class Resource$Accounts$Metadata$Dimensions { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.accounts.metadata.dimensions.list - * @desc List the metadata for the dimensions available to this AdExchange - * account. - * @alias adexchangeseller.accounts.metadata.dimensions.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.accountId Account with visibility to the dimensions. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list( - params?: Params$Resource$Accounts$Metadata$Dimensions$List, - options?: MethodOptions): AxiosPromise; - list( - params: Params$Resource$Accounts$Metadata$Dimensions$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Accounts$Metadata$Dimensions$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Accounts$Metadata$Dimensions$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Accounts$Metadata$Dimensions$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Accounts$Metadata$Dimensions$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/adexchangeseller/v2.0/accounts/{accountId}/metadata/dimensions') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['accountId'], - pathParams: ['accountId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Accounts$Metadata$Dimensions$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Account with visibility to the dimensions. - */ - accountId?: string; - } - - - export class Resource$Accounts$Metadata$Metrics { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.accounts.metadata.metrics.list - * @desc List the metadata for the metrics available to this AdExchange - * account. - * @alias adexchangeseller.accounts.metadata.metrics.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.accountId Account with visibility to the metrics. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list( - params?: Params$Resource$Accounts$Metadata$Metrics$List, - options?: MethodOptions): AxiosPromise; - list( - params: Params$Resource$Accounts$Metadata$Metrics$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Accounts$Metadata$Metrics$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Accounts$Metadata$Metrics$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Accounts$Metadata$Metrics$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Accounts$Metadata$Metrics$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/adexchangeseller/v2.0/accounts/{accountId}/metadata/metrics') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['accountId'], - pathParams: ['accountId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Accounts$Metadata$Metrics$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Account with visibility to the metrics. - */ - accountId?: string; - } - - - - export class Resource$Accounts$Preferreddeals { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.accounts.preferreddeals.get - * @desc Get information about the selected Ad Exchange Preferred Deal. - * @alias adexchangeseller.accounts.preferreddeals.get - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.accountId Account owning the deal. - * @param {string} params.dealId Preferred deal to get information about. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - get(params?: Params$Resource$Accounts$Preferreddeals$Get, - options?: MethodOptions): AxiosPromise; - get(params: Params$Resource$Accounts$Preferreddeals$Get, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - get(params: Params$Resource$Accounts$Preferreddeals$Get, - callback: BodyResponseCallback): void; - get(callback: BodyResponseCallback): void; - get(paramsOrCallback?: Params$Resource$Accounts$Preferreddeals$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Accounts$Preferreddeals$Get; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Accounts$Preferreddeals$Get; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/adexchangeseller/v2.0/accounts/{accountId}/preferreddeals/{dealId}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['accountId', 'dealId'], - pathParams: ['accountId', 'dealId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * adexchangeseller.accounts.preferreddeals.list - * @desc List the preferred deals for this Ad Exchange account. - * @alias adexchangeseller.accounts.preferreddeals.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.accountId Account owning the deals. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list( - params?: Params$Resource$Accounts$Preferreddeals$List, - options?: MethodOptions): AxiosPromise; - list( - params: Params$Resource$Accounts$Preferreddeals$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Accounts$Preferreddeals$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Accounts$Preferreddeals$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Accounts$Preferreddeals$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Accounts$Preferreddeals$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/adexchangeseller/v2.0/accounts/{accountId}/preferreddeals') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['accountId'], - pathParams: ['accountId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Accounts$Preferreddeals$Get { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Account owning the deal. - */ - accountId?: string; - /** - * Preferred deal to get information about. - */ - dealId?: string; - } - export interface Params$Resource$Accounts$Preferreddeals$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Account owning the deals. - */ - accountId?: string; - } - - - export class Resource$Accounts$Reports { - root: Adexchangeseller; - saved: Resource$Accounts$Reports$Saved; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - this.saved = new Resource$Accounts$Reports$Saved(root); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.accounts.reports.generate - * @desc Generate an Ad Exchange report based on the report request sent in - * the query parameters. Returns the result as JSON; to retrieve output in - * CSV format specify "alt=csv" as a query parameter. - * @alias adexchangeseller.accounts.reports.generate - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.accountId Account which owns the generated report. - * @param {string=} params.dimension Dimensions to base the report on. - * @param {string} params.endDate End of the date range to report on in "YYYY-MM-DD" format, inclusive. - * @param {string=} params.filter Filters to be run on the report. - * @param {string=} params.locale Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. - * @param {integer=} params.maxResults The maximum number of rows of report data to return. - * @param {string=} params.metric Numeric columns to include in the report. - * @param {string=} params.sort The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. - * @param {string} params.startDate Start of the date range to report on in "YYYY-MM-DD" format, inclusive. - * @param {integer=} params.startIndex Index of the first row of report data to return. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - generate( - params?: Params$Resource$Accounts$Reports$Generate, - options?: MethodOptions): AxiosPromise; - generate( - params: Params$Resource$Accounts$Reports$Generate, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - generate( - params: Params$Resource$Accounts$Reports$Generate, - callback: BodyResponseCallback): void; - generate(callback: BodyResponseCallback): void; - generate( - paramsOrCallback?: Params$Resource$Accounts$Reports$Generate| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Accounts$Reports$Generate; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Accounts$Reports$Generate; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + - '/adexchangeseller/v2.0/accounts/{accountId}/reports') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['accountId', 'startDate', 'endDate'], - pathParams: ['accountId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Accounts$Reports$Generate { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Account which owns the generated report. - */ - accountId?: string; - /** - * Dimensions to base the report on. - */ - dimension?: string; - /** - * End of the date range to report on in "YYYY-MM-DD" format, inclusive. - */ - endDate?: string; - /** - * Filters to be run on the report. - */ - filter?: string; - /** - * Optional locale to use for translating report output to a local language. - * Defaults to "en_US" if not specified. - */ - locale?: string; - /** - * The maximum number of rows of report data to return. - */ - maxResults?: number; - /** - * Numeric columns to include in the report. - */ - metric?: string; - /** - * The name of a dimension or metric to sort the resulting report on, - * optionally prefixed with "+" to sort ascending or "-" to sort descending. - * If no prefix is specified, the column is sorted ascending. - */ - sort?: string; - /** - * Start of the date range to report on in "YYYY-MM-DD" format, inclusive. - */ - startDate?: string; - /** - * Index of the first row of report data to return. - */ - startIndex?: number; - } - - export class Resource$Accounts$Reports$Saved { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.accounts.reports.saved.generate - * @desc Generate an Ad Exchange report based on the saved report ID sent in - * the query parameters. - * @alias adexchangeseller.accounts.reports.saved.generate - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.accountId Account owning the saved report. - * @param {string=} params.locale Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. - * @param {integer=} params.maxResults The maximum number of rows of report data to return. - * @param {string} params.savedReportId The saved report to retrieve. - * @param {integer=} params.startIndex Index of the first row of report data to return. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - generate( - params?: Params$Resource$Accounts$Reports$Saved$Generate, - options?: MethodOptions): AxiosPromise; - generate( - params: Params$Resource$Accounts$Reports$Saved$Generate, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - generate( - params: Params$Resource$Accounts$Reports$Saved$Generate, - callback: BodyResponseCallback): void; - generate(callback: BodyResponseCallback): void; - generate( - paramsOrCallback?: Params$Resource$Accounts$Reports$Saved$Generate| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Accounts$Reports$Saved$Generate; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Accounts$Reports$Saved$Generate; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/adexchangeseller/v2.0/accounts/{accountId}/reports/{savedReportId}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['accountId', 'savedReportId'], - pathParams: ['accountId', 'savedReportId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * adexchangeseller.accounts.reports.saved.list - * @desc List all saved reports in this Ad Exchange account. - * @alias adexchangeseller.accounts.reports.saved.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.accountId Account owning the saved reports. - * @param {integer=} params.maxResults The maximum number of saved reports to include in the response, used for paging. - * @param {string=} params.pageToken A continuation token, used to page through saved reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list( - params?: Params$Resource$Accounts$Reports$Saved$List, - options?: MethodOptions): AxiosPromise; - list( - params: Params$Resource$Accounts$Reports$Saved$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Accounts$Reports$Saved$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Accounts$Reports$Saved$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Accounts$Reports$Saved$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Accounts$Reports$Saved$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + - '/adexchangeseller/v2.0/accounts/{accountId}/reports/saved') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['accountId'], - pathParams: ['accountId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Accounts$Reports$Saved$Generate { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Account owning the saved report. - */ - accountId?: string; - /** - * Optional locale to use for translating report output to a local language. - * Defaults to "en_US" if not specified. - */ - locale?: string; - /** - * The maximum number of rows of report data to return. - */ - maxResults?: number; - /** - * The saved report to retrieve. - */ - savedReportId?: string; - /** - * Index of the first row of report data to return. - */ - startIndex?: number; - } - export interface Params$Resource$Accounts$Reports$Saved$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Account owning the saved reports. - */ - accountId?: string; - /** - * The maximum number of saved reports to include in the response, used for - * paging. - */ - maxResults?: number; - /** - * A continuation token, used to page through saved reports. To retrieve the - * next page, set this parameter to the value of "nextPageToken" from the - * previous response. - */ - pageToken?: string; - } - - - - export class Resource$Accounts$Urlchannels { - root: Adexchangeseller; - constructor(root: Adexchangeseller) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * adexchangeseller.accounts.urlchannels.list - * @desc List all URL channels in the specified ad client for this Ad - * Exchange account. - * @alias adexchangeseller.accounts.urlchannels.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.accountId Account to which the ad client belongs. - * @param {string} params.adClientId Ad client for which to list URL channels. - * @param {integer=} params.maxResults The maximum number of URL channels to include in the response, used for paging. - * @param {string=} params.pageToken A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list( - params?: Params$Resource$Accounts$Urlchannels$List, - options?: MethodOptions): AxiosPromise; - list( - params: Params$Resource$Accounts$Urlchannels$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Accounts$Urlchannels$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Accounts$Urlchannels$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Accounts$Urlchannels$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Accounts$Urlchannels$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/adexchangeseller/v2.0/accounts/{accountId}/adclients/{adClientId}/urlchannels') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['accountId', 'adClientId'], - pathParams: ['accountId', 'adClientId'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Accounts$Urlchannels$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Account to which the ad client belongs. - */ - accountId?: string; - /** - * Ad client for which to list URL channels. - */ - adClientId?: string; - /** - * The maximum number of URL channels to include in the response, used for - * paging. - */ - maxResults?: number; - /** - * A continuation token, used to page through URL channels. To retrieve the - * next page, set this parameter to the value of "nextPageToken" from the - * previous response. - */ - pageToken?: string; - } -} diff --git a/src/apis/adexperiencereport/v1.ts b/src/apis/adexperiencereport/v1.ts index 0c341740af1..e8b9b738704 100644 --- a/src/apis/adexperiencereport/v1.ts +++ b/src/apis/adexperiencereport/v1.ts @@ -101,8 +101,7 @@ export namespace adexperiencereport_v1 { underReview?: boolean; } /** - * Response message for GetSiteSummary. Do not confuse with same message in - * google.chrome.abusiveexperiencereport.v1 + * Response message for GetSiteSummary. */ export interface Schema$SiteSummaryResponse { /** diff --git a/src/apis/admin/directory_v1.ts b/src/apis/admin/directory_v1.ts index e33deae7716..eb671edbd1a 100644 --- a/src/apis/admin/directory_v1.ts +++ b/src/apis/admin/directory_v1.ts @@ -926,6 +926,10 @@ export namespace admin_directory_v1 { * JSON template for Member resource in Directory API. */ export interface Schema$Member { + /** + * Delivery settings of member + */ + delivery_settings?: string; /** * Email of member (Read-only) */ @@ -1671,7 +1675,7 @@ export namespace admin_directory_v1 { */ aliases?: string[]; /** - * Indicates if user is archived + * Indicates if user is archived. */ archived?: boolean; /** @@ -1773,7 +1777,7 @@ export namespace admin_directory_v1 { relations?: any; sshPublicKeys?: any; /** - * Indicates if user is suspended + * Indicates if user is suspended. */ suspended?: boolean; /** diff --git a/src/apis/androidenterprise/v1.ts b/src/apis/androidenterprise/v1.ts index 80363c55f17..0b1c241d817 100644 --- a/src/apis/androidenterprise/v1.ts +++ b/src/apis/androidenterprise/v1.ts @@ -143,6 +143,46 @@ export namespace androidenterprise_v1 { * "approve" mode. */ permission?: string[]; + /** + * Options for displaying the Play Search page. + */ + playSearch?: Schema$AdministratorWebTokenSpecPlaySearch; + /** + * Options for displaying the Private Apps page. + */ + privateApps?: Schema$AdministratorWebTokenSpecPrivateApps; + /** + * Options for displaying the Store Builder page. + */ + storeBuilder?: Schema$AdministratorWebTokenSpecStoreBuilder; + /** + * Options for displaying the Web Apps page. + */ + webApps?: Schema$AdministratorWebTokenSpecWebApps; + } + export interface Schema$AdministratorWebTokenSpecPlaySearch { + /** + * Whether the Play Search page is displayed. Default is true. + */ + enabled?: boolean; + } + export interface Schema$AdministratorWebTokenSpecPrivateApps { + /** + * Whether the Private Apps page is displayed. Default is true. + */ + enabled?: boolean; + } + export interface Schema$AdministratorWebTokenSpecStoreBuilder { + /** + * Whether the Store Builder page is displayed. Default is true. + */ + enabled?: boolean; + } + export interface Schema$AdministratorWebTokenSpecWebApps { + /** + * Whether the Web Apps page is displayed. Default is true. + */ + enabled?: boolean; } /** * Deprecated and unused. @@ -1625,11 +1665,9 @@ export namespace androidenterprise_v1 { kind?: string; /** * Ordered list of pages a user should be able to reach from this page. The - * pages must exist, must not be this page, and once a link is created the - * page linked to cannot be deleted until all links to it are removed. It is - * recommended that the basic pages are created first, before adding the - * links between pages. No attempt is made to verify that all pages are - * reachable from the homepage. + * list can't include this page. It is recommended that the basic pages + * are created first, before adding the links between pages. The API + * doesn't verify that the pages exist or the pages are reachable. */ link?: string[]; /** diff --git a/src/apis/appengine/v1.ts b/src/apis/appengine/v1.ts index 726bb3cb5c0..98dd998805c 100644 --- a/src/apis/appengine/v1.ts +++ b/src/apis/appengine/v1.ts @@ -1754,7 +1754,7 @@ export namespace appengine_v1 { /** * Duration that static files should be cached by web proxies and browsers. * Only applicable if the corresponding StaticFilesHandler - * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#staticfileshandler) + * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler) * does not specify its own expiration time.Only returned in GET requests if * view=FULL is set. */ @@ -4545,7 +4545,7 @@ export namespace appengine_v1 { * * @param {object} params Parameters for request * @param {string} params.appsId Part of `name`. Name of the resource to update. Example: apps/myapp/services/default. - * @param {boolean=} params.migrateTraffic Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#shardby) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic). + * @param {boolean=} params.migrateTraffic Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic). * @param {string} params.servicesId Part of `name`. See documentation of `appsId`. * @param {string=} params.updateMask Standard field mask for the set of fields to be updated. * @param {().Service} params.resource Request body data @@ -4676,11 +4676,11 @@ export namespace appengine_v1 { * specify. By default, traffic is shifted immediately. For gradual traffic * migration, the target versions must be located within instances that are * configured for both warmup requests - * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#inboundservicetype) + * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType) * and automatic scaling - * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#automaticscaling). + * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling). * You must specify the shardBy - * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#shardby) + * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy) * field in the Service resource. Gradual traffic migration is not supported * in the App Engine flexible environment. For examples, see Migrating and * Splitting Traffic diff --git a/src/apis/appengine/v1beta.ts b/src/apis/appengine/v1beta.ts index 574760c0c3c..dfb57b97025 100644 --- a/src/apis/appengine/v1beta.ts +++ b/src/apis/appengine/v1beta.ts @@ -1838,7 +1838,7 @@ export namespace appengine_v1beta { /** * Duration that static files should be cached by web proxies and browsers. * Only applicable if the corresponding StaticFilesHandler - * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#staticfileshandler) + * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#StaticFilesHandler) * does not specify its own expiration time.Only returned in GET requests if * view=FULL is set. */ @@ -4646,7 +4646,7 @@ export namespace appengine_v1beta { * * @param {object} params Parameters for request * @param {string} params.appsId Part of `name`. Name of the resource to update. Example: apps/myapp/services/default. - * @param {boolean=} params.migrateTraffic Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services#shardby) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic). + * @param {boolean=} params.migrateTraffic Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#InboundServiceType) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#AutomaticScaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services#ShardBy) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic). * @param {string} params.servicesId Part of `name`. See documentation of `appsId`. * @param {string=} params.updateMask Standard field mask for the set of fields to be updated. * @param {().Service} params.resource Request body data @@ -4777,11 +4777,11 @@ export namespace appengine_v1beta { * specify. By default, traffic is shifted immediately. For gradual traffic * migration, the target versions must be located within instances that are * configured for both warmup requests - * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#inboundservicetype) + * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#InboundServiceType) * and automatic scaling - * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#automaticscaling). + * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#AutomaticScaling). * You must specify the shardBy - * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services#shardby) + * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services#ShardBy) * field in the Service resource. Gradual traffic migration is not supported * in the App Engine flexible environment. For examples, see Migrating and * Splitting Traffic diff --git a/src/apis/classroom/v1.ts b/src/apis/classroom/v1.ts index 664d5c1d463..feb7686c2d6 100644 --- a/src/apis/classroom/v1.ts +++ b/src/apis/classroom/v1.ts @@ -489,23 +489,25 @@ export namespace classroom_v1 { courseId?: string; } /** - * Represents a whole calendar date, e.g. date of birth. The time of day and - * time zone are either specified elsewhere or are not significant. The date - * is relative to the Proleptic Gregorian Calendar. The day may be 0 to - * represent a year and month where the day is not significant, e.g. credit - * card expiration date. The year may be 0 to represent a month and day - * independent of year, e.g. anniversary date. Related types are + * Represents a whole or partial calendar date, e.g. a birthday. The time of + * day and time zone are either specified elsewhere or are not significant. + * The date is relative to the Proleptic Gregorian Calendar. This can + * represent: * A full date, with non-zero year, month and day values * A + * month and day value, with a zero year, e.g. an anniversary * A year on its + * own, with zero month and day values * A year and month value, with a zero + * day, e.g. a credit card expiration date Related types are * google.type.TimeOfDay and `google.protobuf.Timestamp`. */ export interface Schema$Date { /** * Day of month. Must be from 1 to 31 and valid for the year and month, or 0 - * if specifying a year/month where the day is not significant. + * if specifying a year by itself or a year and month where the day is not + * significant. */ day?: number; /** - * Month of year. Must be from 1 to 12, or 0 if specifying a date without a - * month. + * Month of year. Must be from 1 to 12, or 0 if specifying a year without a + * month and day. */ month?: number; /** diff --git a/src/apis/cloudbuild/v1.ts b/src/apis/cloudbuild/v1.ts index 6108328cddf..c3d9ae67a0f 100644 --- a/src/apis/cloudbuild/v1.ts +++ b/src/apis/cloudbuild/v1.ts @@ -271,6 +271,11 @@ export namespace cloudbuild_v1 { * error. */ diskSizeGb?: string; + /** + * Option to specify the logging mode, which determines where the logs are + * stored. + */ + logging?: string; /** * Option to define build log streaming behavior to Google Cloud Storage. */ diff --git a/src/apis/cloudkms/README.md b/src/apis/cloudkms/README.md index ff599179364..58bf20ff4c8 100644 --- a/src/apis/cloudkms/README.md +++ b/src/apis/cloudkms/README.md @@ -2,7 +2,7 @@ # @google/cloudkms -> Cloud KMS allows you to keep cryptographic keys in one central cloud service, for direct use by other cloud resources and applications. With Cloud KMS you are the ultimate custodian of your data, you can manage encryption in the cloud the same way you do on-premises, and you have a provable and monitorable root of trust over your data. +> Manages keys and performs cryptographic operations in a central cloud service, for direct use by other cloud resources and applications. ## Installation diff --git a/src/apis/cloudkms/v1.ts b/src/apis/cloudkms/v1.ts index ce5d48ac9bd..01417e14f1e 100644 --- a/src/apis/cloudkms/v1.ts +++ b/src/apis/cloudkms/v1.ts @@ -32,11 +32,8 @@ export namespace cloudkms_v1 { /** * Cloud Key Management Service (KMS) API * - * Cloud KMS allows you to keep cryptographic keys in one central cloud - * service, for direct use by other cloud resources and applications. With - * Cloud KMS you are the ultimate custodian of your data, you can manage - * encryption in the cloud the same way you do on-premises, and you have a - * provable and monitorable root of trust over your data. + * Manages keys and performs cryptographic operations in a central cloud + * service, for direct use by other cloud resources and applications. * * @example * const {google} = require('googleapis'); diff --git a/src/apis/cloudtrace/v1.ts b/src/apis/cloudtrace/v1.ts index 05d520d6a62..eedb87ccada 100644 --- a/src/apis/cloudtrace/v1.ts +++ b/src/apis/cloudtrace/v1.ts @@ -107,7 +107,8 @@ export namespace cloudtrace_v1 { spans?: Schema$TraceSpan[]; /** * Globally unique identifier for the trace. This identifier is a 128-bit - * numeric value formatted as a 32-byte hex string. + * numeric value formatted as a 32-byte hex string. For example, + * `382d4f4c6b7bb2f4a972559d9085001d`. */ traceId?: string; } @@ -171,7 +172,7 @@ export namespace cloudtrace_v1 { parentSpanId?: string; /** * Identifier for the span. Must be a 64-bit integer other than 0 and unique - * within a trace. + * within a trace. For example, `2205310701640571284`. */ spanId?: string; /** diff --git a/src/apis/compute/alpha.ts b/src/apis/compute/alpha.ts index 80b980966a6..ef9194e4513 100644 --- a/src/apis/compute/alpha.ts +++ b/src/apis/compute/alpha.ts @@ -654,6 +654,21 @@ export namespace compute_alpha { specificAllocationRequired?: boolean; zone?: string; } + /** + * AllocationAffinity is the configuration of desired allocation which this + * instance could take capacity from. + */ + export interface Schema$AllocationAffinity { + consumeAllocationType?: string; + /** + * Corresponds to the label key of allocation resource. + */ + key?: string; + /** + * Corresponds to the label values of allocation resource. + */ + values?: string[]; + } /** * Contains a list of allocations. */ @@ -687,7 +702,7 @@ export namespace compute_alpha { */ warning?: any; } - export interface Schema$AllocationsList { + export interface Schema$AllocationList { /** * [Output Only] The unique identifier for the resource. This identifier is * defined by the server. @@ -4200,7 +4215,7 @@ export namespace compute_alpha { * v1.instances ==) */ export interface Schema$Instance { - allocationAffinity?: Schema$InstanceAllocationAffinity; + allocationAffinity?: Schema$AllocationAffinity; /** * Allows this instance to send and receive packets with non-matching * destination or source IPs. This is required if you plan to use this @@ -4411,21 +4426,6 @@ export namespace compute_alpha { */ warning?: any; } - /** - * AllocationAffinity is the configuration of desired allocation which this - * instance could take capacity from. - */ - export interface Schema$InstanceAllocationAffinity { - consumeAllocationType?: string; - /** - * Corresponds to the label key of Allocation resource. - */ - key?: string; - /** - * Corresponds to the label values of allocation resource. - */ - values?: string[]; - } /** * InstanceGroups (== resource_for beta.instanceGroups ==) (== resource_for * v1.instanceGroups ==) (== resource_for beta.regionInstanceGroups ==) (== @@ -5045,6 +5045,13 @@ export namespace compute_alpha { * group itself is not being modified. */ isStable?: boolean; + /** + * [Output Only] A bit indicating whether version target has been reached in + * this managed instance group, i.e. all instances are in their target + * version. Instances' target version are specified by version field on + * Instance Group Manager. + */ + versionTargetReached?: boolean; } /** * InstanceGroupManagers.updatePerInstanceConfigs @@ -6193,6 +6200,12 @@ export namespace compute_alpha { * [Output Only] Server-defined URL for the resource. */ selfLink?: string; + /** + * [Output Only] The status of this InterconnectLocation. If the status is + * AVAILABLE, new Interconnects may be provisioned in this + * InterconnectLocation. Otherwise, no new Interconnects may be provisioned. + */ + status?: string; } /** * Response to the list request, and contains a list of interconnect @@ -7127,7 +7140,7 @@ export namespace compute_alpha { kind?: string; /** * This field is only valid when the network endpoint group is used for load - * balancing. + * balancing. [Deprecated] This field is deprecated. */ loadBalancer?: Schema$NetworkEndpointGroupLbNetworkEndpointGroup; /** @@ -7197,22 +7210,23 @@ export namespace compute_alpha { export interface Schema$NetworkEndpointGroupLbNetworkEndpointGroup { /** * The default port used if the port number is not specified in the network - * endpoint. + * endpoint. [Deprecated] This field is deprecated. */ defaultPort?: number; /** * The URL of the network to which all network endpoints in the NEG belong. - * Uses "default" project network if unspecified. + * Uses "default" project network if unspecified. [Deprecated] + * This field is deprecated. */ network?: string; /** * Optional URL of the subnetwork to which all network endpoints in the NEG - * belong. + * belong. [Deprecated] This field is deprecated. */ subnetwork?: string; /** * [Output Only] The URL of the zone where the network endpoint group is - * located. + * located. [Deprecated] This field is deprecated. */ zone?: string; } @@ -7543,11 +7557,6 @@ export namespace compute_alpha { * which cannot be a dash. */ name?: string; - /** - * [Deprecated] Use nodeGroups.listNodes instead. [Output Only] A list of - * nodes in this node group. - */ - nodes?: Schema$NodeGroupNode[]; /** * The URL of the node template to which this node group belongs. */ @@ -14687,22 +14696,22 @@ export namespace compute_alpha { * @return {object} Request object */ list(params?: Params$Resource$Allocations$List, options?: MethodOptions): - AxiosPromise; + AxiosPromise; list( params: Params$Resource$Allocations$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; list( params: Params$Resource$Allocations$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; list( paramsOrCallback?: Params$Resource$Allocations$List| - BodyResponseCallback, + BodyResponseCallback, optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as Params$Resource$Allocations$List; let options = (optionsOrCallback || {}) as MethodOptions; @@ -14734,9 +14743,9 @@ export namespace compute_alpha { context: this.getRoot() }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } @@ -31747,7 +31756,7 @@ export namespace compute_alpha { * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string=} params.sourceInstanceTemplate Specifies instance template to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: - https://www.googleapis.com/compute/v1/projects/project/global/global/instanceTemplates/instanceTemplate - projects/project/global/global/instanceTemplates/instanceTemplate - global/instancesTemplates/instanceTemplate + * @param {string=} params.sourceInstanceTemplate Specifies instance template to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: - https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate - projects/project/global/instanceTemplates/instanceTemplate - global/instanceTemplates/instanceTemplate * @param {string=} params.sourceMachineImage Specifies instance machine to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: - https://www.googleapis.com/compute/v1/projects/project/global/global/machineImages/machineImage - projects/project/global/global/machineImages/machineImage - global/machineImages/machineImage * @param {string} params.zone The name of the zone for this request. * @param {().Instance} params.resource Request body data @@ -34142,9 +34151,9 @@ export namespace compute_alpha { * Specifies instance template to create the instance. This field is * optional. It can be a full or partial URL. For example, the following are * all valid URLs to an instance template: - - * https://www.googleapis.com/compute/v1/projects/project/global/global/instanceTemplates/instanceTemplate - * - projects/project/global/global/instanceTemplates/instanceTemplate - - * global/instancesTemplates/instanceTemplate + * https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate + * - projects/project/global/instanceTemplates/instanceTemplate - + * global/instanceTemplates/instanceTemplate */ sourceInstanceTemplate?: string; /** diff --git a/src/apis/compute/beta.ts b/src/apis/compute/beta.ts index dc17ecf0d36..ba2483e1701 100644 --- a/src/apis/compute/beta.ts +++ b/src/apis/compute/beta.ts @@ -2669,12 +2669,13 @@ export namespace compute_beta { * only. A global forwarding rule supports either IPv4 or IPv6. When the * load balancing scheme is INTERNAL_SELF_MANAGED, this must be a URL * reference to an existing Address resource ( internal regional static IP - * address). When the load balancing scheme is INTERNAL, this can only be - * an RFC 1918 IP address belonging to the network/subnet configured for the - * forwarding rule. By default, if this field is empty, an ephemeral - * internal IP address will be automatically allocated from the IP range of - * the subnet or network configured for this forwarding rule. An address - * can be specified either by a literal IP address or a URL reference to an + * address), with a purpose of GCE_END_POINT and address_type of INTERNAL. + * When the load balancing scheme is INTERNAL, this can only be an RFC 1918 + * IP address belonging to the network/subnet configured for the forwarding + * rule. By default, if this field is empty, an ephemeral internal IP + * address will be automatically allocated from the IP range of the subnet + * or network configured for this forwarding rule. An address can be + * specified either by a literal IP address or a URL reference to an * existing Address resource. The following examples are all valid: - * 100.1.2.3 - * https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address @@ -2938,6 +2939,60 @@ export namespace compute_beta { */ policy?: Schema$Policy; } + /** + * A guest attributes entry. + */ + export interface Schema$GuestAttributes { + /** + * [Output Only] Type of the resource. Always compute#guestAttributes for + * guest attributes entry. + */ + kind?: string; + /** + * The path to be queried. This can be the default namespace ('/') + * or a nested namespace ('//') or a specified key ('//') + */ + queryPath?: string; + /** + * [Output Only] The value of the requested queried path. + */ + queryValue?: Schema$GuestAttributesValue; + /** + * [Output Only] Server-defined URL for this resource. + */ + selfLink?: string; + /** + * The key to search for. + */ + variableKey?: string; + /** + * [Output Only] The value found for the requested key. + */ + variableValue?: string; + } + /** + * A guest attributes namespace/key/value entry. + */ + export interface Schema$GuestAttributesEntry { + /** + * Key for the guest attribute entry. + */ + key?: string; + /** + * Namespace for the guest attribute entry. + */ + namespace?: string; + /** + * Value for the guest attribute entry. + */ + value?: string; + } + /** + * Array of guest attribute namespace/key/value tuples. + */ + export interface Schema$GuestAttributesValue { + items?: Schema$GuestAttributesEntry[]; + } /** * Guest OS features. */ @@ -3013,7 +3068,6 @@ export namespace compute_beta { * health check field must be specified, which must match type field. */ type?: string; - udpHealthCheck?: Schema$UDPHealthCheck; /** * A so-far healthy instance will be marked unhealthy after this many * consecutive failures. The default value is 2. @@ -3170,6 +3224,51 @@ export namespace compute_beta { */ response?: string; } + export interface Schema$HTTPHealthCheck { + /** + * The value of the host header in the HTTP health check request. If left + * empty (default value), the IP on behalf of which this health check is + * performed will be used. + */ + host?: string; + /** + * The TCP port number for the health check request. The default value + * is 80. Valid values are 1 through 65535. + */ + port?: number; + /** + * Port name as defined in InstanceGroup#NamedPort#name. If both port and + * port_name are defined, port takes precedence. + */ + portName?: string; + /** + * Specifies how port is selected for health checking, can be one of + * following values: USE_FIXED_PORT: The port number in port is used for + * health checking. USE_NAMED_PORT: The portName is used for health + * checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port specified + * for each network endpoint is used for health checking. For other + * backends, the port or named port specified in the Backend Service is used + * for health checking. If not specified, HTTP health check follows + * behavior specified in port and portName fields. + */ + portSpecification?: string; + /** + * Specifies the type of proxy header to append before sending data to the + * backend, either NONE or PROXY_V1. The default is NONE. + */ + proxyHeader?: string; + /** + * The request path of the HTTP health check request. The default value is + * /. + */ + requestPath?: string; + /** + * The string to match anywhere in the first 1024 bytes of the response + * body. If left empty (the default value), the status code determines + * health. The response data can only be ASCII. + */ + response?: string; + } /** * An HttpHealthCheck resource. This resource defines a template for how * individual instances should be checked for health, via HTTP. @@ -3246,51 +3345,6 @@ export namespace compute_beta { */ unhealthyThreshold?: number; } - export interface Schema$HTTPHealthCheck { - /** - * The value of the host header in the HTTP health check request. If left - * empty (default value), the IP on behalf of which this health check is - * performed will be used. - */ - host?: string; - /** - * The TCP port number for the health check request. The default value - * is 80. Valid values are 1 through 65535. - */ - port?: number; - /** - * Port name as defined in InstanceGroup#NamedPort#name. If both port and - * port_name are defined, port takes precedence. - */ - portName?: string; - /** - * Specifies how port is selected for health checking, can be one of - * following values: USE_FIXED_PORT: The port number in port is used for - * health checking. USE_NAMED_PORT: The portName is used for health - * checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port specified - * for each network endpoint is used for health checking. For other - * backends, the port or named port specified in the Backend Service is used - * for health checking. If not specified, HTTP health check follows - * behavior specified in port and portName fields. - */ - portSpecification?: string; - /** - * Specifies the type of proxy header to append before sending data to the - * backend, either NONE or PROXY_V1. The default is NONE. - */ - proxyHeader?: string; - /** - * The request path of the HTTP health check request. The default value is - * /. - */ - requestPath?: string; - /** - * The string to match anywhere in the first 1024 bytes of the response - * body. If left empty (the default value), the status code determines - * health. The response data can only be ASCII. - */ - response?: string; - } /** * Contains a list of HttpHealthCheck resources. */ @@ -4111,6 +4165,10 @@ export namespace compute_beta { * {projectNumber}@cloudservices.gserviceaccount.com is used. */ serviceAccount?: string; + /** + * [Output Only] The status of this managed instance group. + */ + status?: Schema$InstanceGroupManagerStatus; /** * The URLs for all TargetPool resources to which instances in the * instanceGroup field are added. The target pools automatically apply to @@ -4409,6 +4467,17 @@ export namespace compute_beta { */ targetPools?: string[]; } + export interface Schema$InstanceGroupManagerStatus { + /** + * [Output Only] A bit indicating whether the managed instance group is in a + * stable state. A stable state means that: none of the instances in the + * managed instance group is currently undergoing any type of change (for + * example, creation, restart, or deletion); no future changes are scheduled + * for instances in the managed instance group; and the managed instance + * group itself is not being modified. + */ + isStable?: boolean; + } export interface Schema$InstanceGroupManagerUpdatePolicy { /** * The maximum number of instances that can be created above the specified @@ -5320,6 +5389,77 @@ export namespace compute_beta { */ googleDemarcId?: string; } + /** + * Diagnostics information about interconnect, contains detailed and current + * technical information about Google?s side of the connection. + */ + export interface Schema$InterconnectDiagnostics { + /** + * A list of InterconnectDiagnostics.ARPEntry objects, describing individual + * neighbors currently seen by the Google router in the ARP cache for the + * Interconnect. This will be empty when the Interconnect is not bundled. + */ + arpCaches?: Schema$InterconnectDiagnosticsARPEntry[]; + /** + * A list of InterconnectDiagnostics.LinkStatus objects, describing the + * status for each link on the Interconnect. + */ + links?: Schema$InterconnectDiagnosticsLinkStatus[]; + /** + * The MAC address of the Interconnect's bundle interface. + */ + macAddress?: string; + } + /** + * Describing the ARP neighbor entries seen on this link + */ + export interface Schema$InterconnectDiagnosticsARPEntry { + /** + * The IP address of this ARP neighbor. + */ + ipAddress?: string; + /** + * The MAC address of this ARP neighbor. + */ + macAddress?: string; + } + export interface Schema$InterconnectDiagnosticsLinkLACPStatus { + /** + * System ID of the port on Google?s side of the LACP exchange. + */ + googleSystemId?: string; + /** + * System ID of the port on the neighbor?s side of the LACP exchange. + */ + neighborSystemId?: string; + state?: string; + } + export interface Schema$InterconnectDiagnosticsLinkOpticalPower { + state?: string; + /** + * Value of the current optical power, read in dBm. + */ + value?: number; + } + export interface Schema$InterconnectDiagnosticsLinkStatus { + /** + * A list of InterconnectDiagnostics.ARPEntry objects, describing the ARP + * neighbor entries seen on this link. This will be empty if the link is + * bundled + */ + arpCaches?: Schema$InterconnectDiagnosticsARPEntry[]; + /** + * The unique ID for this link assigned during turn up by Google. + */ + circuitId?: string; + /** + * The Demarc address assigned by Google and provided in the LoA. + */ + googleDemarc?: string; + lacpStatus?: Schema$InterconnectDiagnosticsLinkLACPStatus; + receivingOpticalPower?: Schema$InterconnectDiagnosticsLinkOpticalPower; + transmittingOpticalPower?: Schema$InterconnectDiagnosticsLinkOpticalPower; + } /** * Response to the list request, and contains a list of interconnects. */ @@ -5527,6 +5667,12 @@ export namespace compute_beta { */ state?: string; } + /** + * Response for the InterconnectsGetDiagnosticsRequest. + */ + export interface Schema$InterconnectsGetDiagnosticsResponse { + result?: Schema$InterconnectDiagnostics; + } /** * A license resource. */ @@ -5560,8 +5706,8 @@ export namespace compute_beta { */ licenseCode?: string; /** - * [Output Only] Name of the resource. The name is 1-63 characters long and - * complies with RFC1035. + * Name of the resource. The name must be 1-63 characters long and comply + * with RFC1035. */ name?: string; resourceRequirements?: Schema$LicenseResourceRequirements; @@ -6089,6 +6235,11 @@ export namespace compute_beta { * [Output Only] Creation timestamp in RFC3339 text format. */ creationTimestamp?: string; + /** + * The default port used if the port number is not specified in the network + * endpoint. + */ + defaultPort?: number; /** * An optional description of this resource. Provide this property when you * create the resource. @@ -6106,7 +6257,7 @@ export namespace compute_beta { kind?: string; /** * This field is only valid when the network endpoint group is used for load - * balancing. + * balancing. [Deprecated] This field is deprecated. */ loadBalancer?: Schema$NetworkEndpointGroupLbNetworkEndpointGroup; /** @@ -6119,6 +6270,11 @@ export namespace compute_beta { * dash. */ name?: string; + /** + * The URL of the network to which all network endpoints in the NEG belong. + * Uses "default" project network if unspecified. + */ + network?: string; /** * Type of network endpoints in this network endpoint group. Currently the * only supported value is GCE_VM_IP_PORT. @@ -6132,6 +6288,16 @@ export namespace compute_beta { * [Output only] Number of network endpoints in the network endpoint group. */ size?: number; + /** + * Optional URL of the subnetwork to which all network endpoints in the NEG + * belong. + */ + subnetwork?: string; + /** + * [Output Only] The URL of the zone where the network endpoint group is + * located. + */ + zone?: string; } export interface Schema$NetworkEndpointGroupAggregatedList { /** @@ -6171,22 +6337,23 @@ export namespace compute_beta { export interface Schema$NetworkEndpointGroupLbNetworkEndpointGroup { /** * The default port used if the port number is not specified in the network - * endpoint. + * endpoint. [Deprecated] This field is deprecated. */ defaultPort?: number; /** * The URL of the network to which all network endpoints in the NEG belong. - * Uses "default" project network if unspecified. + * Uses "default" project network if unspecified. [Deprecated] + * This field is deprecated. */ network?: string; /** * Optional URL of the subnetwork to which all network endpoints in the NEG - * belong. + * belong. [Deprecated] This field is deprecated. */ subnetwork?: string; /** * [Output Only] The URL of the zone where the network endpoint group is - * located. + * located. [Deprecated] This field is deprecated. */ zone?: string; } @@ -6498,11 +6665,6 @@ export namespace compute_beta { * which cannot be a dash. */ name?: string; - /** - * [Deprecated] Use nodeGroups.listNodes instead. [Output Only] A list of - * nodes in this node group. - */ - nodes?: Schema$NodeGroupNode[]; /** * The URL of the node template to which this node group belongs. */ @@ -8249,6 +8411,10 @@ export namespace compute_beta { * dash. */ name?: string; + /** + * A list of Nat services created in this router. + */ + nats?: Schema$RouterNat[]; /** * URI of the network to which this router belongs. */ @@ -8467,6 +8633,92 @@ export namespace compute_beta { */ warning?: any; } + /** + * Represents a Nat resource. It enables the VMs within the specified + * subnetworks to access Internet without external IP addresses. It specifies + * a list of subnetworks (and the ranges within) that want to use NAT. + * Customers can also provide the external IPs that would be used for NAT. GCP + * would auto-allocate ephemeral IPs if no external IPs are provided. + */ + export interface Schema$RouterNat { + /** + * Timeout (in seconds) for ICMP connections. Defaults to 30s if not set. + */ + icmpIdleTimeoutSec?: number; + /** + * Minimum number of ports allocated to a VM from this NAT config. If not + * set, a default number of ports is allocated to a VM. This gets rounded up + * to the nearest power of 2. Eg. if the value of this field is 50, at least + * 64 ports will be allocated to a VM. + */ + minPortsPerVm?: number; + /** + * Unique name of this Nat service. The name must be 1-63 characters long + * and comply with RFC1035. + */ + name?: string; + /** + * Specify the NatIpAllocateOption. If it is AUTO_ONLY, then nat_ip should + * be empty. + */ + natIpAllocateOption?: string; + /** + * A list of URLs of the IP resources used for this Nat service. These IPs + * must be valid static external IP addresses assigned to the project. + * max_length is subject to change post alpha. + */ + natIps?: string[]; + /** + * Specify the Nat option. If this field contains + * ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, + * then there should not be any other Router.Nat section in any Router for + * this network in this region. + */ + sourceSubnetworkIpRangesToNat?: string; + /** + * A list of Subnetwork resources whose traffic should be translated by NAT + * Gateway. It is used only when LIST_OF_SUBNETWORKS is selected for the + * SubnetworkIpRangeToNatOption above. + */ + subnetworks?: Schema$RouterNatSubnetworkToNat[]; + /** + * Timeout (in seconds) for TCP established connections. Defaults to 1200s + * if not set. + */ + tcpEstablishedIdleTimeoutSec?: number; + /** + * Timeout (in seconds) for TCP transitory connections. Defaults to 30s if + * not set. + */ + tcpTransitoryIdleTimeoutSec?: number; + /** + * Timeout (in seconds) for UDP connections. Defaults to 30s if not set. + */ + udpIdleTimeoutSec?: number; + } + /** + * Defines the IP ranges that want to use NAT for a subnetwork. + */ + export interface Schema$RouterNatSubnetworkToNat { + /** + * URL for the subnetwork resource to use NAT. + */ + name?: string; + /** + * A list of the secondary ranges of the Subnetwork that are allowed to use + * NAT. This can be populated only if + * "LIST_OF_SECONDARY_IP_RANGES" is one of the values in + * source_ip_ranges_to_nat. + */ + secondaryIpRangeNames?: string[]; + /** + * Specify the options for NAT ranges in the Subnetwork. All usages of + * single value are valid except NAT_IP_RANGE_OPTION_UNSPECIFIED. The only + * valid option with multiple values is: ["PRIMARY_IP_RANGE", + * "LIST_OF_SECONDARY_IP_RANGES"] Default: [ALL_IP_RANGES] + */ + sourceIpRangesToNat?: string[]; + } export interface Schema$RoutersPreviewResponse { /** * Preview of given router. @@ -8494,6 +8746,7 @@ export namespace compute_beta { */ bestRoutesForRouter?: Schema$Route[]; bgpPeerStatus?: Schema$RouterStatusBgpPeerStatus[]; + natStatus?: Schema$RouterStatusNatStatus[]; /** * URI of the network to which this router belongs. */ @@ -8542,6 +8795,40 @@ export namespace compute_beta { */ uptimeSeconds?: string; } + /** + * Status of a NAT contained in this router. + */ + export interface Schema$RouterStatusNatStatus { + /** + * A list of IPs auto-allocated for NAT. Example: ["1.1.1.1", + * "129.2.16.89"] + */ + autoAllocatedNatIps?: string[]; + /** + * The number of extra IPs to allocate. This will be greater than 0 only if + * user-specified IPs are NOT enough to allow all configured VMs to use NAT. + * This value is meaningful only when auto-allocation of NAT IPs is *not* + * used. + */ + minExtraNatIpsNeeded?: number; + /** + * Unique name of this NAT. + */ + name?: string; + /** + * Number of VM endpoints (i.e., Nics) that can use NAT. + */ + numVmEndpointsWithNatMappings?: number; + /** + * A list of fully qualified URLs of reserved IP address resources. + */ + userAllocatedNatIpResources?: string[]; + /** + * A list of IPs user-allocated for NAT. They will be raw IP strings like + * "179.12.26.133". + */ + userAllocatedNatIps?: string[]; + } export interface Schema$RouterStatusResponse { /** * Type of resource. @@ -8878,6 +9165,25 @@ export namespace compute_beta { */ enableVtpm?: boolean; } + /** + * A shielded VM identity entry. + */ + export interface Schema$ShieldedVmIdentity { + encryptionKey?: Schema$ShieldedVmIdentityEntry; + /** + * [Output Only] Type of the resource. Always compute#shieldedVmIdentity for + * shielded VM identity entry. + */ + kind?: string; + signingKey?: Schema$ShieldedVmIdentityEntry; + } + /** + * A Shielded VM Identity Entry. + */ + export interface Schema$ShieldedVmIdentityEntry { + ekCert?: string; + ekPub?: string; + } /** * The policy describes the baseline against which VM instance boot integrity * is measured. @@ -9408,7 +9714,9 @@ export namespace compute_beta { */ description?: string; /** - * Whether to enable flow logging for this subnetwork. + * Whether to enable flow logging for this subnetwork. If this field is not + * explicitly set, it will not appear in get listings. If not set the + * default behavior is to disable flow logging. */ enableFlowLogs?: boolean; /** @@ -10584,28 +10892,6 @@ export namespace compute_beta { */ permissions?: string[]; } - export interface Schema$UDPHealthCheck { - /** - * The UDP port number for the health check request. Valid values are 1 - * through 65535. - */ - port?: number; - /** - * Port name as defined in InstanceGroup#NamedPort#name. If both port and - * port_name are defined, port takes precedence. - */ - portName?: string; - /** - * Raw data of request to send in payload of UDP packet. It is an error if - * this is empty. The request data can only be ASCII. - */ - request?: string; - /** - * The bytes to match against the beginning of the response data. It is an - * error if this is empty. The response data can only be ASCII. - */ - response?: string; - } /** * A UrlMap resource. This resource defines the mapping from URL to the * BackendService resource, based on the "longest-match" of the @@ -10848,6 +11134,78 @@ export namespace compute_beta { */ reportNamePrefix?: string; } + /** + * Contain information of Nat mapping for a VM endpoint (i.e., NIC). + */ + export interface Schema$VmEndpointNatMappings { + /** + * Name of the VM instance which the endpoint belongs to + */ + instanceName?: string; + interfaceNatMappings?: Schema$VmEndpointNatMappingsInterfaceNatMappings[]; + } + /** + * Contain information of Nat mapping for an interface of this endpoint. + */ + export interface Schema$VmEndpointNatMappingsInterfaceNatMappings { + /** + * A list of all IP:port-range mappings assigned to this interface. These + * ranges are inclusive, that is, both the first and the last ports can be + * used for NAT. Example: ["2.2.2.2:12345-12355", + * "1.1.1.1:2234-2234"]. + */ + natIpPortRanges?: string[]; + /** + * Total number of ports across all NAT IPs allocated to this interface. It + * equals to the aggregated port number in the field nat_ip_port_ranges. + */ + numTotalNatPorts?: number; + /** + * Alias IP range for this interface endpoint. It will be a private (RFC + * 1918) IP range. Examples: "10.33.4.55/32", or + * "192.168.5.0/24". + */ + sourceAliasIpRange?: string; + /** + * Primary IP of the VM for this NIC. + */ + sourceVirtualIp?: string; + } + /** + * Contains a list of VmEndpointNatMappings. + */ + export interface Schema$VmEndpointNatMappingsList { + /** + * [Output Only] The unique identifier for the resource. This identifier is + * defined by the server. + */ + id?: string; + /** + * [Output Only] Type of resource. Always compute#vmEndpointNatMappingsList + * for lists of Nat mappings of VM endpoints. + */ + kind?: string; + /** + * [Output Only] This token allows you to get the next page of results for + * list requests. If the number of results is larger than maxResults, use + * the nextPageToken as a value for the query parameter pageToken in the + * next list request. Subsequent list requests will have their own + * nextPageToken to continue paging through the results. + */ + nextPageToken?: string; + /** + * [Output Only] A list of Nat mapping information of VM endpoints. + */ + result?: Schema$VmEndpointNatMappings[]; + /** + * [Output Only] Server-defined URL for this resource. + */ + selfLink?: string; + /** + * [Output Only] Informational warning message. + */ + warning?: any; + } /** * VPN tunnel resource. (== resource_for beta.vpnTunnels ==) (== resource_for * v1.vpnTunnels ==) @@ -36078,6 +36436,80 @@ export namespace compute_beta { } + /** + * compute.instances.getGuestAttributes + * @desc Returns the specified guest attributes entry. + * @alias compute.instances.getGuestAttributes + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.instance Name of the instance scoping this request. + * @param {string} params.project Project ID for this request. + * @param {string=} params.queryPath Specifies the guest attributes path to be queried. + * @param {string=} params.variableKey Specifies the key for the guest attributes entry. + * @param {string} params.zone The name of the zone for this request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getGuestAttributes( + params?: Params$Resource$Instances$Getguestattributes, + options?: MethodOptions): AxiosPromise; + getGuestAttributes( + params: Params$Resource$Instances$Getguestattributes, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getGuestAttributes( + params: Params$Resource$Instances$Getguestattributes, + callback: BodyResponseCallback): void; + getGuestAttributes(callback: BodyResponseCallback): + void; + getGuestAttributes( + paramsOrCallback?: Params$Resource$Instances$Getguestattributes| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Instances$Getguestattributes; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Getguestattributes; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/beta/projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'zone', 'instance'], + pathParams: ['instance', 'project', 'zone'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.instances.getIamPolicy * @desc Gets the access control policy for a resource. May be empty if no @@ -36281,6 +36713,78 @@ export namespace compute_beta { } + /** + * compute.instances.getShieldedVmIdentity + * @desc Returns the Shielded VM Identity of an instance + * @alias compute.instances.getShieldedVmIdentity + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.instance Name of the instance scoping this request. + * @param {string} params.project Project ID for this request. + * @param {string} params.zone The name of the zone for this request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getShieldedVmIdentity( + params?: Params$Resource$Instances$Getshieldedvmidentity, + options?: MethodOptions): AxiosPromise; + getShieldedVmIdentity( + params: Params$Resource$Instances$Getshieldedvmidentity, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getShieldedVmIdentity( + params: Params$Resource$Instances$Getshieldedvmidentity, + callback: BodyResponseCallback): void; + getShieldedVmIdentity( + callback: BodyResponseCallback): void; + getShieldedVmIdentity( + paramsOrCallback?: Params$Resource$Instances$Getshieldedvmidentity| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Instances$Getshieldedvmidentity; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Getshieldedvmidentity; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/beta/projects/{project}/zones/{zone}/instances/{instance}/getShieldedVmIdentity') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'zone', 'instance'], + pathParams: ['instance', 'project', 'zone'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.instances.insert * @desc Creates an instance resource in the specified project using the @@ -36351,7 +36855,7 @@ export namespace compute_beta { * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string=} params.sourceInstanceTemplate Specifies instance template to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: - https://www.googleapis.com/compute/v1/projects/project/global/global/instanceTemplates/instanceTemplate - projects/project/global/global/instanceTemplates/instanceTemplate - global/instancesTemplates/instanceTemplate + * @param {string=} params.sourceInstanceTemplate Specifies instance template to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: - https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate - projects/project/global/instanceTemplates/instanceTemplate - global/instanceTemplates/instanceTemplate * @param {string} params.zone The name of the zone for this request. * @param {().Instance} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -39450,22 +39954,62 @@ export namespace compute_beta { * The name of the zone for this request. */ zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$AttachedDisk; + + /** + * Request body metadata + */ + requestBody?: Schema$AttachedDisk; + } + export interface Params$Resource$Instances$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the instance resource to delete. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * An optional request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. For example, consider a + * situation where you make an initial request and the request times out. If + * you make the request again with the same request ID, the server can check + * if original operation with the same request ID was received, and if so, + * will ignore the second request. This prevents clients from accidentally + * creating duplicate commitments. The request ID must be a valid UUID with + * the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** + * The name of the zone for this request. + */ + zone?: string; } - export interface Params$Resource$Instances$Delete { + export interface Params$Resource$Instances$Deleteaccessconfig { /** * Auth client or API Key for the request */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Name of the instance resource to delete. + * The name of the access config to delete. + */ + accessConfig?: string; + /** + * The instance name for this request. */ instance?: string; + /** + * The name of the network interface. + */ + networkInterface?: string; /** * Project ID for this request. */ @@ -39488,24 +40032,20 @@ export namespace compute_beta { */ zone?: string; } - export interface Params$Resource$Instances$Deleteaccessconfig { + export interface Params$Resource$Instances$Detachdisk { /** * Auth client or API Key for the request */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * The name of the access config to delete. + * Disk device name to detach. */ - accessConfig?: string; + deviceName?: string; /** - * The instance name for this request. + * Instance name. */ instance?: string; - /** - * The name of the network interface. - */ - networkInterface?: string; /** * Project ID for this request. */ @@ -39528,56 +40068,47 @@ export namespace compute_beta { */ zone?: string; } - export interface Params$Resource$Instances$Detachdisk { + export interface Params$Resource$Instances$Get { /** * Auth client or API Key for the request */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Disk device name to detach. - */ - deviceName?: string; - /** - * Instance name. + * Name of the instance resource to return. */ instance?: string; /** * Project ID for this request. */ project?: string; - /** - * An optional request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. For example, consider a - * situation where you make an initial request and the request times out. If - * you make the request again with the same request ID, the server can check - * if original operation with the same request ID was received, and if so, - * will ignore the second request. This prevents clients from accidentally - * creating duplicate commitments. The request ID must be a valid UUID with - * the exception that zero UUID is not supported - * (00000000-0000-0000-0000-000000000000). - */ - requestId?: string; /** * The name of the zone for this request. */ zone?: string; } - export interface Params$Resource$Instances$Get { + export interface Params$Resource$Instances$Getguestattributes { /** * Auth client or API Key for the request */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Name of the instance resource to return. + * Name of the instance scoping this request. */ instance?: string; /** * Project ID for this request. */ project?: string; + /** + * Specifies the guest attributes path to be queried. + */ + queryPath?: string; + /** + * Specifies the key for the guest attributes entry. + */ + variableKey?: string; /** * The name of the zone for this request. */ @@ -39633,6 +40164,25 @@ export namespace compute_beta { */ zone?: string; } + export interface Params$Resource$Instances$Getshieldedvmidentity { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the instance scoping this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + } export interface Params$Resource$Instances$Insert { /** * Auth client or API Key for the request @@ -39660,9 +40210,9 @@ export namespace compute_beta { * Specifies instance template to create the instance. This field is * optional. It can be a full or partial URL. For example, the following are * all valid URLs to an instance template: - - * https://www.googleapis.com/compute/v1/projects/project/global/global/instanceTemplates/instanceTemplate - * - projects/project/global/global/instanceTemplates/instanceTemplate - - * global/instancesTemplates/instanceTemplate + * https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate + * - projects/project/global/instanceTemplates/instanceTemplate - + * global/instanceTemplates/instanceTemplate */ sourceInstanceTemplate?: string; /** @@ -43416,6 +43966,88 @@ export namespace compute_beta { } + /** + * compute.interconnects.getDiagnostics + * @desc Returns the interconnectDiagnostics for the specified interconnect. + * @alias compute.interconnects.getDiagnostics + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.interconnect Name of the interconnect resource to query. + * @param {string} params.project Project ID for this request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getDiagnostics( + params?: Params$Resource$Interconnects$Getdiagnostics, + options?: MethodOptions): + AxiosPromise; + getDiagnostics( + params: Params$Resource$Interconnects$Getdiagnostics, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + getDiagnostics( + params: Params$Resource$Interconnects$Getdiagnostics, + callback: + BodyResponseCallback): + void; + getDiagnostics( + callback: + BodyResponseCallback): + void; + getDiagnostics( + paramsOrCallback?: Params$Resource$Interconnects$Getdiagnostics| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Interconnects$Getdiagnostics; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Interconnects$Getdiagnostics; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/beta/projects/{project}/global/interconnects/{interconnect}/getDiagnostics') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'interconnect'], + pathParams: ['interconnect', 'project'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + /** * compute.interconnects.insert * @desc Creates a Interconnect in the specified project using the data @@ -44064,6 +44696,21 @@ export namespace compute_beta { */ project?: string; } + export interface Params$Resource$Interconnects$Getdiagnostics { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the interconnect resource to query. + */ + interconnect?: string; + /** + * Project ID for this request. + */ + project?: string; + } export interface Params$Resource$Interconnects$Insert { /** * Auth client or API Key for the request @@ -62619,6 +63266,85 @@ export namespace compute_beta { } + /** + * compute.routers.getNatMappingInfo + * @desc Retrieves runtime Nat mapping information of VM endpoints. + * @alias compute.routers.getNatMappingInfo + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true). + * @param {integer=} params.maxResults The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + * @param {string=} params.orderBy Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by name or creationTimestamp desc is supported. + * @param {string=} params.pageToken Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. + * @param {string} params.project Project ID for this request. + * @param {string} params.region Name of the region for this request. + * @param {string} params.router Name of the Router resource to query for Nat Mapping information of VM endpoints. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getNatMappingInfo( + params?: Params$Resource$Routers$Getnatmappinginfo, + options?: MethodOptions): + AxiosPromise; + getNatMappingInfo( + params: Params$Resource$Routers$Getnatmappinginfo, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + getNatMappingInfo( + params: Params$Resource$Routers$Getnatmappinginfo, + callback: BodyResponseCallback): void; + getNatMappingInfo( + callback: BodyResponseCallback): void; + getNatMappingInfo( + paramsOrCallback?: Params$Resource$Routers$Getnatmappinginfo| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Routers$Getnatmappinginfo; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Routers$Getnatmappinginfo; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/beta/projects/{project}/regions/{region}/routers/{router}/getNatMappingInfo') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'region', 'router'], + pathParams: ['project', 'region', 'router'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.routers.getRouterStatus * @desc Retrieves runtime information of the specified router. @@ -63675,6 +64401,69 @@ export namespace compute_beta { */ router?: string; } + export interface Params$Resource$Routers$Getnatmappinginfo { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * A filter expression that filters resources listed in the response. The + * expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, or a boolean. The comparison operator must be either =, !=, >, or + * <. For example, if you are filtering Compute Engine instances, you can + * exclude instances named example-instance by specifying name != + * example-instance. You can also filter nested fields. For example, you + * could specify scheduling.automaticRestart = false to include instances + * only if they are not scheduled for automatic restarts. You can use + * filtering on nested fields to filter based on resource labels. To filter + * on multiple expressions, provide each separate expression within + * parentheses. For example, (scheduling.automaticRestart = true) + * (cpuPlatform = "Intel Skylake"). By default, each expression is an AND + * expression. However, you can include AND and OR expressions explicitly. + * For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel + * Broadwell") AND (scheduling.automaticRestart = true). + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the + * number of available results is larger than maxResults, Compute Engine + * returns a nextPageToken that can be used to get the next page of results + * in subsequent list requests. Acceptable values are 0 to 500, inclusive. + * (Default: 500) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned + * in alphanumerical order based on the resource name. You can also sort + * results in descending order based on the creation timestamp using + * orderBy="creationTimestamp desc". This sorts results based on the + * creationTimestamp field in reverse chronological order (newest result + * first). Use this to sort resources like operations so that the newest + * operation is returned first. Currently, only sorting by name or + * creationTimestamp desc is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set pageToken to the nextPageToken + * returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region for this request. + */ + region?: string; + /** + * Name of the Router resource to query for Nat Mapping information of VM + * endpoints. + */ + router?: string; + } export interface Params$Resource$Routers$Getrouterstatus { /** * Auth client or API Key for the request @@ -64728,6 +65517,7 @@ export namespace compute_beta { * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. * @param {string} params.securityPolicy Name of the security policy to update. + * @param {boolean=} params.validateOnly If true, the request will not be committed. * @param {().SecurityPolicyRule} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -65179,6 +65969,7 @@ export namespace compute_beta { * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean=} params.validateOnly If true, the request will not be committed. * @param {().SecurityPolicy} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -65620,6 +66411,7 @@ export namespace compute_beta { * @param {integer=} params.priority The priority of the rule to patch. * @param {string} params.project Project ID for this request. * @param {string} params.securityPolicy Name of the security policy to update. + * @param {boolean=} params.validateOnly If true, the request will not be committed. * @param {().SecurityPolicyRule} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -65970,6 +66762,10 @@ export namespace compute_beta { * Name of the security policy to update. */ securityPolicy?: string; + /** + * If true, the request will not be committed. + */ + validateOnly?: boolean; /** * Request body metadata @@ -66061,6 +66857,10 @@ export namespace compute_beta { * (00000000-0000-0000-0000-000000000000). */ requestId?: string; + /** + * If true, the request will not be committed. + */ + validateOnly?: boolean; /** * Request body metadata @@ -66226,6 +67026,10 @@ export namespace compute_beta { * Name of the security policy to update. */ securityPolicy?: string; + /** + * If true, the request will not be committed. + */ + validateOnly?: boolean; /** * Request body metadata diff --git a/src/apis/compute/v1.ts b/src/apis/compute/v1.ts index 2c6d0ade393..092a25edf27 100644 --- a/src/apis/compute/v1.ts +++ b/src/apis/compute/v1.ts @@ -30409,7 +30409,7 @@ export namespace compute_v1 { * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string=} params.sourceInstanceTemplate Specifies instance template to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: - https://www.googleapis.com/compute/v1/projects/project/global/global/instanceTemplates/instanceTemplate - projects/project/global/global/instanceTemplates/instanceTemplate - global/instancesTemplates/instanceTemplate + * @param {string=} params.sourceInstanceTemplate Specifies instance template to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: - https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate - projects/project/global/instanceTemplates/instanceTemplate - global/instanceTemplates/instanceTemplate * @param {string} params.zone The name of the zone for this request. * @param {().Instance} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -33131,9 +33131,9 @@ export namespace compute_v1 { * Specifies instance template to create the instance. This field is * optional. It can be a full or partial URL. For example, the following are * all valid URLs to an instance template: - - * https://www.googleapis.com/compute/v1/projects/project/global/global/instanceTemplates/instanceTemplate - * - projects/project/global/global/instanceTemplates/instanceTemplate - - * global/instancesTemplates/instanceTemplate + * https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate + * - projects/project/global/instanceTemplates/instanceTemplate - + * global/instanceTemplates/instanceTemplate */ sourceInstanceTemplate?: string; /** diff --git a/src/apis/container/v1.ts b/src/apis/container/v1.ts index 4f90aa43497..d89e5866ec3 100644 --- a/src/apis/container/v1.ts +++ b/src/apis/container/v1.ts @@ -360,6 +360,10 @@ export namespace container_v1 { * specified. */ nodePools?: Schema$NodePool[]; + /** + * Configuration for private cluster. + */ + privateClusterConfig?: Schema$PrivateClusterConfig; /** * The resource labels for the cluster to use to annotate any related Google * Compute Engine resources. @@ -1145,6 +1149,39 @@ export namespace container_v1 { */ zone?: string; } + /** + * Configuration options for private clusters. + */ + export interface Schema$PrivateClusterConfig { + /** + * Whether the master's internal IP address is used as the cluster + * endpoint. + */ + enablePrivateEndpoint?: boolean; + /** + * Whether nodes have internal IP addresses only. If enabled, all nodes are + * given only RFC 1918 private addresses and communicate with the master via + * private networking. + */ + enablePrivateNodes?: boolean; + /** + * The IP range in CIDR notation to use for the hosted master network. This + * range will be used for assigning internal IP addresses to the master or + * set of masters, as well as the ILB VIP. This range must not overlap with + * any other ranges in use within the cluster's network. + */ + masterIpv4CidrBlock?: string; + /** + * Output only. The internal IP address of this cluster's master + * endpoint. + */ + privateEndpoint?: string; + /** + * Output only. The external IP address of this cluster's master + * endpoint. + */ + publicEndpoint?: string; + } /** * RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed * NodePool upgrade. This will be an no-op if the last upgrade successfully diff --git a/src/apis/container/v1beta1.ts b/src/apis/container/v1beta1.ts index d0bd6a88504..bbccea9d7e4 100644 --- a/src/apis/container/v1beta1.ts +++ b/src/apis/container/v1beta1.ts @@ -407,7 +407,7 @@ export namespace container_v1beta1 { * If this is a private cluster setup. Private clusters are clusters that, * by default have no external IP addresses on the nodes and where nodes and * the master communicate over private IP addresses. This field is - * deprecated, use private_cluster_config.enabled instead. + * deprecated, use private_cluster_config.enable_private_nodes instead. */ privateCluster?: boolean; /** @@ -1451,14 +1451,16 @@ export namespace container_v1beta1 { */ enablePrivateEndpoint?: boolean; /** - * Whether nodes have only private IP addresses, and communicate with the - * master via private networking. + * Whether nodes have internal IP addresses only. If enabled, all nodes are + * given only RFC 1918 private addresses and communicate with the master via + * private networking. */ enablePrivateNodes?: boolean; /** - * The IP prefix in CIDR notation to use for the hosted master network. This - * prefix will be used for assigning private IP addresses to the master or - * set of masters, as well as the ILB VIP. + * The IP range in CIDR notation to use for the hosted master network. This + * range will be used for assigning internal IP addresses to the master or + * set of masters, as well as the ILB VIP. This range must not overlap with + * any other ranges in use within the cluster's network. */ masterIpv4CidrBlock?: string; /** diff --git a/src/apis/content/v2.ts b/src/apis/content/v2.ts index 60eecf2865f..cf7db2a58e7 100644 --- a/src/apis/content/v2.ts +++ b/src/apis/content/v2.ts @@ -60,6 +60,7 @@ export namespace content_v2 { orderinvoices: Resource$Orderinvoices; orderpayments: Resource$Orderpayments; orderreports: Resource$Orderreports; + orderreturns: Resource$Orderreturns; orders: Resource$Orders; pos: Resource$Pos; products: Resource$Products; @@ -81,6 +82,7 @@ export namespace content_v2 { this.orderinvoices = new Resource$Orderinvoices(this); this.orderpayments = new Resource$Orderpayments(this); this.orderreports = new Resource$Orderreports(this); + this.orderreturns = new Resource$Orderreturns(this); this.orders = new Resource$Orders(this); this.pos = new Resource$Pos(this); this.products = new Resource$Products(this); @@ -370,7 +372,7 @@ export namespace content_v2 { */ kind?: string; /** - * The status of the updated link. Only defined if the method is link. + * Deprecated. This field is never set. */ linkStatus?: string; } @@ -896,6 +898,10 @@ export namespace content_v2 { */ services?: string[]; } + export interface Schema$CustomerReturnReason { + description?: string; + reasonCode?: string; + } export interface Schema$CutoffTime { /** * Hour of the cutoff time until which an order has to be placed to be @@ -2026,6 +2032,22 @@ export namespace content_v2 { */ ratio?: number; } + export interface Schema$MerchantOrderReturn { + creationDate?: string; + merchantOrderId?: string; + orderId?: string; + orderReturnId?: string; + returnItems?: Schema$MerchantOrderReturnItem[]; + returnShipments?: Schema$ReturnShipment[]; + } + export interface Schema$MerchantOrderReturnItem { + customerReturnReason?: Schema$CustomerReturnReason; + itemId?: string; + merchantReturnReason?: Schema$RefundReason; + product?: Schema$OrderLineItemProduct; + returnShipmentIds?: string[]; + state?: string; + } export interface Schema$Order { /** * Whether the order was acknowledged. @@ -2176,8 +2198,7 @@ export namespace content_v2 { } export interface Schema$OrderCustomer { /** - * Email address that should be used for order related communications. In - * certain cases this might not be a real users email, but a proxy email. + * Deprecated. */ email?: string; /** @@ -2577,9 +2598,13 @@ export namespace content_v2 { */ chargeState?: string; /** - * Invoice ID from orderInvoice service that corresponds to the charge. + * Deprecated. Please use invoiceIds instead. */ invoiceId?: string; + /** + * Invoice IDs from the orderinvoices service that correspond to the charge. + */ + invoiceIds?: string[]; } export interface Schema$OrderpaymentsNotifyChargeResponse { /** @@ -2594,9 +2619,13 @@ export namespace content_v2 { } export interface Schema$OrderpaymentsNotifyRefundRequest { /** - * Invoice ID from orderInvoice service that corresponds to the charge. + * Deprecated. Please use invoiceIds instead. */ invoiceId?: string; + /** + * Invoice IDs from the orderinvoices service that correspond to the refund. + */ + invoiceIds?: string[]; /** * Whether refund was successful. */ @@ -2807,6 +2836,18 @@ export namespace content_v2 { */ reasonText?: string; } + export interface Schema$OrderreturnsListResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#orderreturnsListResponse". + */ + kind?: string; + /** + * The token for the retrieval of the next page of returns. + */ + nextPageToken?: string; + resources?: Schema$MerchantOrderReturn[]; + } export interface Schema$OrdersAcknowledgeRequest { /** * The ID of the operation. Unique across all operations for a given order. @@ -2952,6 +2993,23 @@ export namespace content_v2 { */ orderId?: string; } + export interface Schema$OrdersCreateTestReturnRequest { + /** + * Returned items. + */ + items?: Schema$OrdersCustomBatchRequestEntryCreateTestReturnReturnItem[]; + } + export interface Schema$OrdersCreateTestReturnResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#ordersCreateTestReturnResponse". + */ + kind?: string; + /** + * The ID of the newly created test order return. + */ + returnId?: string; + } export interface Schema$OrdersCustomBatchRequest { /** * The request entries to be processed in the batch. @@ -3084,6 +3142,16 @@ export namespace content_v2 { */ reasonText?: string; } + export interface Schema$OrdersCustomBatchRequestEntryCreateTestReturnReturnItem { + /** + * The ID of the line item to return. + */ + lineItemId?: string; + /** + * Quantity that is returned. + */ + quantity?: number; + } export interface Schema$OrdersCustomBatchRequestEntryInStoreRefundLineItem { /** * The amount that is refunded. Required. @@ -4497,7 +4565,7 @@ export namespace content_v2 { */ offerId?: string; /** - * Whether an item is available for purchase only online. + * Deprecated. Whether an item is available for purchase only online. */ onlineOnly?: boolean; /** @@ -4592,7 +4660,8 @@ export namespace content_v2 { */ unitPricingMeasure?: Schema$ProductUnitPricingMeasure; /** - * The read-only list of intended destinations which passed validation. + * Deprecated. The read-only list of intended destinations which passed + * validation. */ validatedDestinations?: string[]; /** @@ -4626,7 +4695,7 @@ export namespace content_v2 { type?: string; /** * Free-form unit of the attribute. Unit can only be used for values of type - * INT or FLOAT. + * int, float, or price. */ unit?: string; /** @@ -5100,6 +5169,16 @@ export namespace content_v2 { */ subtables?: Schema$Table[]; } + export interface Schema$RefundReason { + description?: string; + reasonCode?: string; + } + export interface Schema$ReturnShipment { + creationDate?: string; + returnMethodType?: string; + shipmentId?: string; + shipmentTrackingInfos?: Schema$ShipmentTrackingInfo[]; + } export interface Schema$Row { /** * The list of cells that constitute the row. Must have the same length as @@ -5183,6 +5262,10 @@ export namespace content_v2 { */ unitInvoice?: Schema$UnitInvoice; } + export interface Schema$ShipmentTrackingInfo { + carrier?: string; + trackingNumber?: string; + } /** * The merchant account's shipping settings. */ @@ -5369,7 +5452,7 @@ export namespace content_v2 { } export interface Schema$TestOrderCustomer { /** - * Email address of the customer. + * Deprecated. */ email?: string; /** @@ -10326,12 +10409,12 @@ export namespace content_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.disbursementEndDate The last date in which disbursements occurred. In ISO 8601 format. Default: current date. * @param {string} params.disbursementId The Google-provided ID of the disbursement (found in Wallet). - * @param {string=} params.disbursementStartDate The first date in which disbursements occurred. In ISO 8601 format. * @param {integer=} params.maxResults The maximum number of disbursements to return in the response, used for paging. * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. * @param {string=} params.pageToken The token returned by the previous request. + * @param {string=} params.transactionEndDate The last date in which transaction occurred. In ISO 8601 format. Default: current date. + * @param {string=} params.transactionStartDate The first date in which transaction occurred. In ISO 8601 format. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -10441,19 +10524,10 @@ export namespace content_v2 { */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - /** - * The last date in which disbursements occurred. In ISO 8601 format. - * Default: current date. - */ - disbursementEndDate?: string; /** * The Google-provided ID of the disbursement (found in Wallet). */ disbursementId?: string; - /** - * The first date in which disbursements occurred. In ISO 8601 format. - */ - disbursementStartDate?: string; /** * The maximum number of disbursements to return in the response, used for * paging. @@ -10468,6 +10542,217 @@ export namespace content_v2 { * The token returned by the previous request. */ pageToken?: string; + /** + * The last date in which transaction occurred. In ISO 8601 format. Default: + * current date. + */ + transactionEndDate?: string; + /** + * The first date in which transaction occurred. In ISO 8601 format. + */ + transactionStartDate?: string; + } + + + export class Resource$Orderreturns { + root: Content; + constructor(root: Content) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * content.orderreturns.get + * @desc Retrieves an order return from your Merchant Center account. + * @alias content.orderreturns.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.returnId Merchant order return ID generated by Google. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Orderreturns$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Orderreturns$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Orderreturns$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Orderreturns$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Orderreturns$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orderreturns$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + '/content/v2/{merchantId}/orderreturns/{returnId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId', 'returnId'], + pathParams: ['merchantId', 'returnId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.orderreturns.list + * @desc Lists order returns in your Merchant Center account. + * @alias content.orderreturns.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.createdEndDate Obtains order returns created before this date (inclusively), in ISO 8601 format. + * @param {string=} params.createdStartDate Obtains order returns created after this date (inclusively), in ISO 8601 format. + * @param {integer=} params.maxResults The maximum number of order returns to return in the response, used for paging. The default value is 25 returns per page, and the maximum allowed value is 250 returns per page. + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string=} params.orderBy Return the results in the specified order. + * @param {string=} params.pageToken The token returned by the previous request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list(params?: Params$Resource$Orderreturns$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Orderreturns$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Orderreturns$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Orderreturns$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Orderreturns$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orderreturns$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/content/v2/{merchantId}/orderreturns') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId'], + pathParams: ['merchantId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Orderreturns$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * Merchant order return ID generated by Google. + */ + returnId?: string; + } + export interface Params$Resource$Orderreturns$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Obtains order returns created before this date (inclusively), in ISO 8601 + * format. + */ + createdEndDate?: string; + /** + * Obtains order returns created after this date (inclusively), in ISO 8601 + * format. + */ + createdStartDate?: string; + /** + * The maximum number of order returns to return in the response, used for + * paging. The default value is 25 returns per page, and the maximum allowed + * value is 250 returns per page. + */ + maxResults?: number; + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * Return the results in the specified order. + */ + orderBy?: string; + /** + * The token returned by the previous request. + */ + pageToken?: string; } @@ -10938,6 +11223,84 @@ export namespace content_v2 { } + /** + * content.orders.createtestreturn + * @desc Sandbox only. Creates a test return. + * @alias content.orders.createtestreturn + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the order. + * @param {().OrdersCreateTestReturnRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + createtestreturn( + params?: Params$Resource$Orders$Createtestreturn, + options?: MethodOptions): + AxiosPromise; + createtestreturn( + params: Params$Resource$Orders$Createtestreturn, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + createtestreturn( + params: Params$Resource$Orders$Createtestreturn, + callback: BodyResponseCallback): + void; + createtestreturn( + callback: BodyResponseCallback): + void; + createtestreturn( + paramsOrCallback?: Params$Resource$Orders$Createtestreturn| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Orders$Createtestreturn; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orders$Createtestreturn; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + + '/content/v2/{merchantId}/orders/{orderId}/testreturn') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + /** * content.orders.custombatch * @desc Retrieves or modifies multiple orders in a single request. @@ -12225,6 +12588,27 @@ export namespace content_v2 { */ requestBody?: Schema$OrdersCreateTestOrderRequest; } + export interface Params$Resource$Orders$Createtestreturn { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the order. + */ + orderId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$OrdersCreateTestReturnRequest; + } export interface Params$Resource$Orders$Custombatch { /** * Auth client or API Key for the request diff --git a/src/apis/content/v2sandbox.ts b/src/apis/content/v2sandbox.ts index a1433d024fe..959238cb801 100644 --- a/src/apis/content/v2sandbox.ts +++ b/src/apis/content/v2sandbox.ts @@ -52,6 +52,7 @@ export namespace content_v2sandbox { orderinvoices: Resource$Orderinvoices; orderpayments: Resource$Orderpayments; + orderreturns: Resource$Orderreturns; orders: Resource$Orders; constructor(options: GlobalOptions, google?: GoogleConfigurable) { @@ -61,6 +62,7 @@ export namespace content_v2sandbox { this.orderinvoices = new Resource$Orderinvoices(this); this.orderpayments = new Resource$Orderpayments(this); + this.orderreturns = new Resource$Orderreturns(this); this.orders = new Resource$Orders(this); } @@ -79,6 +81,10 @@ export namespace content_v2sandbox { */ tax?: Schema$Price; } + export interface Schema$CustomerReturnReason { + description?: string; + reasonCode?: string; + } /** * An error returned by the API. */ @@ -160,6 +166,22 @@ export namespace content_v2sandbox { */ type?: string; } + export interface Schema$MerchantOrderReturn { + creationDate?: string; + merchantOrderId?: string; + orderId?: string; + orderReturnId?: string; + returnItems?: Schema$MerchantOrderReturnItem[]; + returnShipments?: Schema$ReturnShipment[]; + } + export interface Schema$MerchantOrderReturnItem { + customerReturnReason?: Schema$CustomerReturnReason; + itemId?: string; + merchantReturnReason?: Schema$RefundReason; + product?: Schema$OrderLineItemProduct; + returnShipmentIds?: string[]; + state?: string; + } export interface Schema$Order { /** * Whether the order was acknowledged. @@ -310,8 +332,7 @@ export namespace content_v2sandbox { } export interface Schema$OrderCustomer { /** - * Email address that should be used for order related communications. In - * certain cases this might not be a real users email, but a proxy email. + * Deprecated. */ email?: string; /** @@ -711,9 +732,13 @@ export namespace content_v2sandbox { */ chargeState?: string; /** - * Invoice ID from orderInvoice service that corresponds to the charge. + * Deprecated. Please use invoiceIds instead. */ invoiceId?: string; + /** + * Invoice IDs from the orderinvoices service that correspond to the charge. + */ + invoiceIds?: string[]; } export interface Schema$OrderpaymentsNotifyChargeResponse { /** @@ -728,9 +753,13 @@ export namespace content_v2sandbox { } export interface Schema$OrderpaymentsNotifyRefundRequest { /** - * Invoice ID from orderInvoice service that corresponds to the charge. + * Deprecated. Please use invoiceIds instead. */ invoiceId?: string; + /** + * Invoice IDs from the orderinvoices service that correspond to the refund. + */ + invoiceIds?: string[]; /** * Whether refund was successful. */ @@ -851,6 +880,18 @@ export namespace content_v2sandbox { */ reasonText?: string; } + export interface Schema$OrderreturnsListResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#orderreturnsListResponse". + */ + kind?: string; + /** + * The token for the retrieval of the next page of returns. + */ + nextPageToken?: string; + resources?: Schema$MerchantOrderReturn[]; + } export interface Schema$OrdersAcknowledgeRequest { /** * The ID of the operation. Unique across all operations for a given order. @@ -996,6 +1037,23 @@ export namespace content_v2sandbox { */ orderId?: string; } + export interface Schema$OrdersCreateTestReturnRequest { + /** + * Returned items. + */ + items?: Schema$OrdersCustomBatchRequestEntryCreateTestReturnReturnItem[]; + } + export interface Schema$OrdersCreateTestReturnResponse { + /** + * Identifies what kind of resource this is. Value: the fixed string + * "content#ordersCreateTestReturnResponse". + */ + kind?: string; + /** + * The ID of the newly created test order return. + */ + returnId?: string; + } export interface Schema$OrdersCustomBatchRequest { /** * The request entries to be processed in the batch. @@ -1128,6 +1186,16 @@ export namespace content_v2sandbox { */ reasonText?: string; } + export interface Schema$OrdersCustomBatchRequestEntryCreateTestReturnReturnItem { + /** + * The ID of the line item to return. + */ + lineItemId?: string; + /** + * Quantity that is returned. + */ + quantity?: number; + } export interface Schema$OrdersCustomBatchRequestEntryInStoreRefundLineItem { /** * The amount that is refunded. Required. @@ -1903,6 +1971,16 @@ export namespace content_v2sandbox { */ promotionId?: string; } + export interface Schema$RefundReason { + description?: string; + reasonCode?: string; + } + export interface Schema$ReturnShipment { + creationDate?: string; + returnMethodType?: string; + shipmentId?: string; + shipmentTrackingInfos?: Schema$ShipmentTrackingInfo[]; + } export interface Schema$ShipmentInvoice { /** * [required] Invoice summary. @@ -1936,6 +2014,10 @@ export namespace content_v2sandbox { */ unitInvoice?: Schema$UnitInvoice; } + export interface Schema$ShipmentTrackingInfo { + carrier?: string; + trackingNumber?: string; + } export interface Schema$TestOrder { /** * The details of the customer who placed the order. @@ -1987,7 +2069,7 @@ export namespace content_v2sandbox { } export interface Schema$TestOrderCustomer { /** - * Email address of the customer. + * Deprecated. */ email?: string; /** @@ -2805,6 +2887,208 @@ export namespace content_v2sandbox { } + export class Resource$Orderreturns { + root: Content; + constructor(root: Content) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * content.orderreturns.get + * @desc Retrieves an order return from your Merchant Center account. + * @alias content.orderreturns.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.returnId Merchant order return ID generated by Google. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Orderreturns$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Orderreturns$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Orderreturns$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Orderreturns$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Orderreturns$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orderreturns$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + + '/content/v2sandbox/{merchantId}/orderreturns/{returnId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId', 'returnId'], + pathParams: ['merchantId', 'returnId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * content.orderreturns.list + * @desc Lists order returns in your Merchant Center account. + * @alias content.orderreturns.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.createdEndDate Obtains order returns created before this date (inclusively), in ISO 8601 format. + * @param {string=} params.createdStartDate Obtains order returns created after this date (inclusively), in ISO 8601 format. + * @param {integer=} params.maxResults The maximum number of order returns to return in the response, used for paging. The default value is 25 returns per page, and the maximum allowed value is 250 returns per page. + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string=} params.orderBy Return the results in the specified order. + * @param {string=} params.pageToken The token returned by the previous request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list(params?: Params$Resource$Orderreturns$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Orderreturns$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Orderreturns$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Orderreturns$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Orderreturns$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orderreturns$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/content/v2sandbox/{merchantId}/orderreturns') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['merchantId'], + pathParams: ['merchantId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Orderreturns$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * Merchant order return ID generated by Google. + */ + returnId?: string; + } + export interface Params$Resource$Orderreturns$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Obtains order returns created before this date (inclusively), in ISO 8601 + * format. + */ + createdEndDate?: string; + /** + * Obtains order returns created after this date (inclusively), in ISO 8601 + * format. + */ + createdStartDate?: string; + /** + * The maximum number of order returns to return in the response, used for + * paging. The default value is 25 returns per page, and the maximum allowed + * value is 250 returns per page. + */ + maxResults?: number; + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * Return the results in the specified order. + */ + orderBy?: string; + /** + * The token returned by the previous request. + */ + pageToken?: string; + } + + export class Resource$Orders { root: Content; constructor(root: Content) { @@ -3275,6 +3559,85 @@ export namespace content_v2sandbox { } + /** + * content.orders.createtestreturn + * @desc Sandbox only. Creates a test return. + * @alias content.orders.createtestreturn + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. + * @param {string} params.orderId The ID of the order. + * @param {().OrdersCreateTestReturnRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + createtestreturn( + params?: Params$Resource$Orders$Createtestreturn, + options?: MethodOptions): + AxiosPromise; + createtestreturn( + params: Params$Resource$Orders$Createtestreturn, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + createtestreturn( + params: Params$Resource$Orders$Createtestreturn, + callback: BodyResponseCallback): + void; + createtestreturn( + callback: BodyResponseCallback): + void; + createtestreturn( + paramsOrCallback?: Params$Resource$Orders$Createtestreturn| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Orders$Createtestreturn; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Orders$Createtestreturn; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/content/v2sandbox/{merchantId}/orders/{orderId}/testreturn') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['merchantId', 'orderId'], + pathParams: ['merchantId', 'orderId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + /** * content.orders.custombatch * @desc Retrieves or modifies multiple orders in a single request. @@ -4566,6 +4929,27 @@ export namespace content_v2sandbox { */ requestBody?: Schema$OrdersCreateTestOrderRequest; } + export interface Params$Resource$Orders$Createtestreturn { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The ID of the account that manages the order. This cannot be a + * multi-client account. + */ + merchantId?: string; + /** + * The ID of the order. + */ + orderId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$OrdersCreateTestReturnRequest; + } export interface Params$Resource$Orders$Custombatch { /** * Auth client or API Key for the request diff --git a/src/apis/dataproc/v1.ts b/src/apis/dataproc/v1.ts index 1b4246f05b8..2e4b718019c 100644 --- a/src/apis/dataproc/v1.ts +++ b/src/apis/dataproc/v1.ts @@ -313,6 +313,21 @@ export namespace dataproc_v1 { */ stateStartTime?: string; } + /** + * A selector that chooses target cluster for jobs based on metadata. + */ + export interface Schema$ClusterSelector { + /** + * Required. The cluster labels. Cluster must have all labels to match. + */ + clusterLabels?: any; + /** + * Optional. The zone where workflow process executes. This parameter does + * not affect the selection of the cluster.If unspecified, the zone of the + * first cluster matching the selector is used. + */ + zone?: string; + } /** * The status of a cluster and its instances. */ @@ -643,6 +658,32 @@ export namespace dataproc_v1 { */ numInstances?: number; } + /** + * A request to instantiate a workflow template. + */ + export interface Schema$InstantiateWorkflowTemplateRequest { + /** + * Optional. Map from parameter names to values that should be used for + * those parameters. Values may not exceed 100 characters. + */ + parameters?: any; + /** + * Optional. A tag that prevents multiple concurrent workflow instances with + * the same tag from running. This mitigates risk of concurrent instances + * started due to retries.It is recommended to always set this value to a + * UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The + * tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), + * and hyphens (-). The maximum length is 40 characters. + */ + requestId?: string; + /** + * Optional. The version of workflow template to instantiate. If specified, + * the workflow will be instantiated only if the current version of the + * workflow template has the supplied version.This option cannot be used to + * instantiate a previous version of workflow template. + */ + version?: number; + } /** * A Cloud Dataproc job resource. */ @@ -833,6 +874,22 @@ export namespace dataproc_v1 { */ operations?: Schema$Operation[]; } + /** + * A response to a request to list workflow templates in a project. + */ + export interface Schema$ListWorkflowTemplatesResponse { + /** + * Output only. This token is included in the response if there are more + * results to fetch. To fetch additional results, provide this value as the + * page_token in a subsequent + * <code>ListWorkflowTemplatesRequest</code>. + */ + nextPageToken?: string; + /** + * Output only. WorkflowTemplates list. + */ + templates?: Schema$WorkflowTemplate[]; + } /** * The runtime logging config of the job. */ @@ -845,6 +902,32 @@ export namespace dataproc_v1 { */ driverLogLevels?: any; } + /** + * Cluster that is managed by the workflow. + */ + export interface Schema$ManagedCluster { + /** + * Required. The cluster name prefix. A unique cluster name will be formed + * by appending a random suffix.The name must contain only lower-case + * letters (a-z), numbers (0-9), and hyphens (-). Must begin with a letter. + * Cannot begin or end with hyphen. Must consist of between 2 and 35 + * characters. + */ + clusterName?: string; + /** + * Required. The cluster configuration. + */ + config?: Schema$ClusterConfig; + /** + * Optional. The labels to associate with this cluster.Label keys must be + * between 1 and 63 characters long, and must conform to the following PCRE + * regular expression: \p{Ll}\p{Lo}{0,62}Label values must be between 1 and + * 63 characters long, and must conform to the following PCRE regular + * expression: \p{Ll}\p{Lo}\p{N}_-{0,63}No more than 32 labels can be + * associated with a given cluster. + */ + labels?: any; + } /** * Specifies the resources used to actively manage an instance group. */ @@ -915,6 +998,75 @@ export namespace dataproc_v1 { */ response?: any; } + /** + * A job executed by the workflow. + */ + export interface Schema$OrderedJob { + /** + * Job is a Hadoop job. + */ + hadoopJob?: Schema$HadoopJob; + /** + * Job is a Hive job. + */ + hiveJob?: Schema$HiveJob; + /** + * Optional. The labels to associate with this job.Label keys must be + * between 1 and 63 characters long, and must conform to the following + * regular expression: \p{Ll}\p{Lo}{0,62}Label values must be between 1 and + * 63 characters long, and must conform to the following regular expression: + * \p{Ll}\p{Lo}\p{N}_-{0,63}No more than 32 labels can be associated with a + * given job. + */ + labels?: any; + /** + * Job is a Pig job. + */ + pigJob?: Schema$PigJob; + /** + * Optional. The optional list of prerequisite job step_ids. If not + * specified, the job will start at the beginning of workflow. + */ + prerequisiteStepIds?: string[]; + /** + * Job is a Pyspark job. + */ + pysparkJob?: Schema$PySparkJob; + /** + * Optional. Job scheduling configuration. + */ + scheduling?: Schema$JobScheduling; + /** + * Job is a Spark job. + */ + sparkJob?: Schema$SparkJob; + /** + * Job is a SparkSql job. + */ + sparkSqlJob?: Schema$SparkSqlJob; + /** + * Required. The step id. The id must be unique among all jobs within the + * template.The step id is used as prefix for job id, as job + * goog-dataproc-workflow-step-id label, and in prerequisiteStepIds field + * from other steps.The id must contain only letters (a-z, A-Z), numbers + * (0-9), underscores (_), and hyphens (-). Cannot begin or end with + * underscore or hyphen. Must consist of between 3 and 50 characters. + */ + stepId?: string; + } + /** + * Configuration for parameter validation. + */ + export interface Schema$ParameterValidation { + /** + * Validation based on regular expressions. + */ + regex?: Schema$RegexValidation; + /** + * Validation based on a list of allowed values. + */ + values?: Schema$ValueValidation; + } /** * A Cloud Dataproc job for running Apache Pig (https://pig.apache.org/) * queries on YARN. @@ -1063,6 +1215,17 @@ export namespace dataproc_v1 { */ queries?: string[]; } + /** + * Validation based on regular expressions. + */ + export interface Schema$RegexValidation { + /** + * Required. RE2 regular expressions used to validate the parameter's + * value. The value must match the regex in its entirety (substring matches + * are not sufficient). + */ + regexes?: string[]; + } /** * Request message for SetIamPolicy method. */ @@ -1250,6 +1413,60 @@ export namespace dataproc_v1 { */ requestId?: string; } + /** + * A configurable parameter that replaces one or more fields in the template. + * Parameterizable fields: - Labels - File uris - Job properties - Job + * arguments - Script variables - Main class (in HadoopJob and SparkJob) - + * Zone (in ClusterSelector) + */ + export interface Schema$TemplateParameter { + /** + * Optional. Brief description of the parameter. Must not exceed 1024 + * characters. + */ + description?: string; + /** + * Required. Paths to all fields that the parameter replaces. A field is + * allowed to appear in at most one parameter's list of field paths.A + * field path is similar in syntax to a google.protobuf.FieldMask. For + * example, a field path that references the zone field of a workflow + * template's cluster selector would be specified as + * <code>placement.clusterSelector.zone</code>.Also, field paths + * can reference fields using the following syntax: Values in maps can be + * referenced by key. Examples<br> labels'key' + * placement.clusterSelector.clusterLabels'key' + * placement.managedCluster.labels'key' + * placement.clusterSelector.clusterLabels'key' + * jobsstep-id.labels'key' Jobs in the jobs list can be referenced + * by step-id. Examples:<br> jobsstep-id.hadoopJob.mainJarFileUri + * jobsstep-id.hiveJob.queryFileUri jobsstep-id.pySparkJob.mainPythonFileUri + * jobsstep-id.hadoopJob.jarFileUris0 jobsstep-id.hadoopJob.archiveUris0 + * jobsstep-id.hadoopJob.fileUris0 jobsstep-id.pySparkJob.pythonFileUris0 + * Items in repeated fields can be referenced by a zero-based index. + * Example:<br> jobsstep-id.sparkJob.args0 Other examples: + * jobsstep-id.hadoopJob.properties'key' jobsstep-id.hadoopJob.args0 + * jobsstep-id.hiveJob.scriptVariables'key' + * jobsstep-id.hadoopJob.mainJarFileUri placement.clusterSelector.zoneIt may + * not be possible to parameterize maps and repeated fields in their + * entirety since only individual map values and individual items in + * repeated fields can be referenced. For example, the following field paths + * are invalid: placement.clusterSelector.clusterLabels + * jobsstep-id.sparkJob.args + */ + fields?: string[]; + /** + * Required. Parameter name. The parameter name is used as the key, and + * paired with the parameter value, which are passed to the template when + * the template is instantiated. The name must contain only capital letters + * (A-Z), numbers (0-9), and underscores (_), and must not start with a + * number. The maximum length is 40 characters. + */ + name?: string; + /** + * Optional. Validation rules to be applied to this parameter's value. + */ + validation?: Schema$ParameterValidation; + } /** * Request message for TestIamPermissions method. */ @@ -1272,6 +1489,15 @@ export namespace dataproc_v1 { */ permissions?: string[]; } + /** + * Validation based on a list of allowed values. + */ + export interface Schema$ValueValidation { + /** + * Required. List of allowed values for the parameter. + */ + values?: string[]; + } /** * The workflow graph. */ @@ -1344,6 +1570,81 @@ export namespace dataproc_v1 { */ stepId?: string; } + /** + * A Cloud Dataproc workflow template resource. + */ + export interface Schema$WorkflowTemplate { + /** + * Output only. The time template was created. + */ + createTime?: string; + /** + * Required. The template id.The id must contain only letters (a-z, A-Z), + * numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with + * underscore or hyphen. Must consist of between 3 and 50 characters. + */ + id?: string; + /** + * Required. The Directed Acyclic Graph of Jobs to submit. + */ + jobs?: Schema$OrderedJob[]; + /** + * Optional. The labels to associate with this template. These labels will + * be propagated to all jobs and clusters created by the workflow + * instance.Label keys must contain 1 to 63 characters, and must conform to + * RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).Label values may be + * empty, but, if present, must contain 1 to 63 characters, and must conform + * to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).No more than 32 labels + * can be associated with a template. + */ + labels?: any; + /** + * Output only. The "resource name" of the template, as described + * in https://cloud.google.com/apis/design/resource_names of the form + * projects/{project_id}/regions/{region}/workflowTemplates/{template_id} + */ + name?: string; + /** + * Optional. Template parameters whose values are substituted into the + * template. Values for parameters must be provided when the template is + * instantiated. + */ + parameters?: Schema$TemplateParameter[]; + /** + * Required. WorkflowTemplate scheduling information. + */ + placement?: Schema$WorkflowTemplatePlacement; + /** + * Output only. The time template was last updated. + */ + updateTime?: string; + /** + * Optional. Used to perform a consistent read-modify-write.This field + * should be left blank for a CreateWorkflowTemplate request. It is required + * for an UpdateWorkflowTemplate request, and must match the current server + * version. A typical update template flow would fetch the current template + * with a GetWorkflowTemplate request, which will return the current + * template with the version field filled in with the current server + * version. The user updates other fields in the template, then returns it + * as part of the UpdateWorkflowTemplate request. + */ + version?: number; + } + /** + * Specifies workflow execution target.Either managed_cluster or + * cluster_selector is required. + */ + export interface Schema$WorkflowTemplatePlacement { + /** + * Optional. A selector that chooses target cluster for jobs based on + * metadata.The selector is evaluated at the time each job is submitted. + */ + clusterSelector?: Schema$ClusterSelector; + /** + * Optional. A cluster that is managed by the workflow. + */ + managedCluster?: Schema$ManagedCluster; + } /** * A YARN application created by a job. Application information is a subset of * <code>org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto</code>.Beta @@ -1419,48 +1720,45 @@ export namespace dataproc_v1 { /** - * dataproc.projects.locations.workflowTemplates.getIamPolicy - * @desc Gets the access control policy for a resource. Returns an empty - * policy if the resource exists and does not have a policy set. - * @alias dataproc.projects.locations.workflowTemplates.getIamPolicy + * dataproc.projects.locations.workflowTemplates.create + * @desc Creates new workflow template. + * @alias dataproc.projects.locations.workflowTemplates.create * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. - * @param {().GetIamPolicyRequest} params.resource Request body data + * @param {string} params.parent Required. The "resource name" of the region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region} + * @param {().WorkflowTemplate} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - getIamPolicy( - params?: - Params$Resource$Projects$Locations$Workflowtemplates$Getiampolicy, - options?: MethodOptions): AxiosPromise; - getIamPolicy( - params: - Params$Resource$Projects$Locations$Workflowtemplates$Getiampolicy, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - getIamPolicy( - params: - Params$Resource$Projects$Locations$Workflowtemplates$Getiampolicy, - callback: BodyResponseCallback): void; - getIamPolicy(callback: BodyResponseCallback): void; - getIamPolicy( + create( + params?: Params$Resource$Projects$Locations$Workflowtemplates$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Projects$Locations$Workflowtemplates$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Projects$Locations$Workflowtemplates$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( paramsOrCallback?: - Params$Resource$Projects$Locations$Workflowtemplates$Getiampolicy| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + Params$Resource$Projects$Locations$Workflowtemplates$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Locations$Workflowtemplates$Getiampolicy; + Params$Resource$Projects$Locations$Workflowtemplates$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; params = {} as - Params$Resource$Projects$Locations$Workflowtemplates$Getiampolicy; + Params$Resource$Projects$Locations$Workflowtemplates$Create; options = {}; } @@ -1473,67 +1771,64 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1/{+resource}:getIamPolicy') + url: (rootUrl + '/v1/{+parent}/workflowTemplates') .replace(/([^:]\/)\/+/g, '$1'), method: 'POST' }, options), params, - requiredParams: ['resource'], - pathParams: ['resource'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.getRoot() }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * dataproc.projects.locations.workflowTemplates.setIamPolicy - * @desc Sets the access control policy on the specified resource. Replaces - * any existing policy. - * @alias dataproc.projects.locations.workflowTemplates.setIamPolicy + * dataproc.projects.locations.workflowTemplates.delete + * @desc Deletes a workflow template. It does not cancel in-progress + * workflows. + * @alias dataproc.projects.locations.workflowTemplates.delete * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. - * @param {().SetIamPolicyRequest} params.resource Request body data + * @param {string} params.name Required. The "resource name" of the workflow template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id} + * @param {integer=} params.version Optional. The version of workflow template to delete. If specified, will only delete the template if the current server version matches specified version. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - setIamPolicy( - params?: - Params$Resource$Projects$Locations$Workflowtemplates$Setiampolicy, - options?: MethodOptions): AxiosPromise; - setIamPolicy( - params: - Params$Resource$Projects$Locations$Workflowtemplates$Setiampolicy, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - setIamPolicy( - params: - Params$Resource$Projects$Locations$Workflowtemplates$Setiampolicy, - callback: BodyResponseCallback): void; - setIamPolicy(callback: BodyResponseCallback): void; - setIamPolicy( + delete( + params?: Params$Resource$Projects$Locations$Workflowtemplates$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Workflowtemplates$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Projects$Locations$Workflowtemplates$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - Params$Resource$Projects$Locations$Workflowtemplates$Setiampolicy| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + Params$Resource$Projects$Locations$Workflowtemplates$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Locations$Workflowtemplates$Setiampolicy; + Params$Resource$Projects$Locations$Workflowtemplates$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; params = {} as - Params$Resource$Projects$Locations$Workflowtemplates$Setiampolicy; + Params$Resource$Projects$Locations$Workflowtemplates$Delete; options = {}; } @@ -1546,77 +1841,59 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1/{+resource}:setIamPolicy') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' }, options), params, - requiredParams: ['resource'], - pathParams: ['resource'], + requiredParams: ['name'], + pathParams: ['name'], context: this.getRoot() }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * dataproc.projects.locations.workflowTemplates.testIamPermissions - * @desc Returns permissions that a caller has on the specified resource. If - * the resource does not exist, this will return an empty set of - * permissions, not a NOT_FOUND error.Note: This operation is designed to be - * used for building permission-aware UIs and command-line tools, not for - * authorization checking. This operation may "fail open" without warning. - * @alias dataproc.projects.locations.workflowTemplates.testIamPermissions + * dataproc.projects.locations.workflowTemplates.get + * @desc Retrieves the latest workflow template.Can retrieve previously + * instantiated template by specifying optional version parameter. + * @alias dataproc.projects.locations.workflowTemplates.get * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. - * @param {().TestIamPermissionsRequest} params.resource Request body data + * @param {string} params.name Required. The "resource name" of the workflow template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id} + * @param {integer=} params.version Optional. The version of workflow template to retrieve. Only previously instatiated versions can be retrieved.If unspecified, retrieves the current version. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - testIamPermissions( - params?: - Params$Resource$Projects$Locations$Workflowtemplates$Testiampermissions, - options?: MethodOptions): - AxiosPromise; - testIamPermissions( - params: - Params$Resource$Projects$Locations$Workflowtemplates$Testiampermissions, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): - void; - testIamPermissions( - params: - Params$Resource$Projects$Locations$Workflowtemplates$Testiampermissions, - callback: BodyResponseCallback): - void; - testIamPermissions( - callback: BodyResponseCallback): - void; - testIamPermissions( - paramsOrCallback?: - Params$Resource$Projects$Locations$Workflowtemplates$Testiampermissions| - BodyResponseCallback, + get(params?: Params$Resource$Projects$Locations$Workflowtemplates$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Projects$Locations$Workflowtemplates$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Projects$Locations$Workflowtemplates$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: + Params$Resource$Projects$Locations$Workflowtemplates$Get| + BodyResponseCallback, optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Locations$Workflowtemplates$Testiampermissions; + Params$Resource$Projects$Locations$Workflowtemplates$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as - Params$Resource$Projects$Locations$Workflowtemplates$Testiampermissions; + params = {} as Params$Resource$Projects$Locations$Workflowtemplates$Get; options = {}; } @@ -1629,212 +1906,145 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1/{+resource}:testIamPermissions') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' }, options), params, - requiredParams: ['resource'], - pathParams: ['resource'], + requiredParams: ['name'], + pathParams: ['name'], context: this.getRoot() }; if (callback) { - createAPIRequest( - parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } - } - - export interface Params$Resource$Projects$Locations$Workflowtemplates$Getiampolicy { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * REQUIRED: The resource for which the policy is being requested. See the - * operation documentation for the appropriate value for this field. - */ - resource?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GetIamPolicyRequest; - } - export interface Params$Resource$Projects$Locations$Workflowtemplates$Setiampolicy { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * REQUIRED: The resource for which the policy is being specified. See the - * operation documentation for the appropriate value for this field. - */ - resource?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$SetIamPolicyRequest; - } - export interface Params$Resource$Projects$Locations$Workflowtemplates$Testiampermissions { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - /** - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - */ - resource?: string; /** - * Request body metadata + * dataproc.projects.locations.workflowTemplates.getIamPolicy + * @desc Gets the access control policy for a resource. Returns an empty + * policy if the resource exists and does not have a policy set. + * @alias dataproc.projects.locations.workflowTemplates.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + * @param {().GetIamPolicyRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object */ - requestBody?: Schema$TestIamPermissionsRequest; - } - - - - export class Resource$Projects$Regions { - root: Dataproc; - clusters: Resource$Projects$Regions$Clusters; - jobs: Resource$Projects$Regions$Jobs; - operations: Resource$Projects$Regions$Operations; - workflowTemplates: Resource$Projects$Regions$Workflowtemplates; - constructor(root: Dataproc) { - this.root = root; - this.getRoot.bind(this); - this.clusters = new Resource$Projects$Regions$Clusters(root); - this.jobs = new Resource$Projects$Regions$Jobs(root); - this.operations = new Resource$Projects$Regions$Operations(root); - this.workflowTemplates = - new Resource$Projects$Regions$Workflowtemplates(root); - } - - getRoot() { - return this.root; - } - } + getIamPolicy( + params?: + Params$Resource$Projects$Locations$Workflowtemplates$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: + Params$Resource$Projects$Locations$Workflowtemplates$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: + Params$Resource$Projects$Locations$Workflowtemplates$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + Params$Resource$Projects$Locations$Workflowtemplates$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Locations$Workflowtemplates$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Locations$Workflowtemplates$Getiampolicy; + options = {}; + } - export class Resource$Projects$Regions$Clusters { - root: Dataproc; - constructor(root: Dataproc) { - this.root = root; - this.getRoot.bind(this); - } + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } - getRoot() { - return this.root; + const rootUrl = options.rootUrl || 'https://dataproc.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } } /** - * dataproc.projects.regions.clusters.create - * @desc Creates a cluster in a project. - * @example - * * // BEFORE RUNNING: - * // --------------- - * // 1. If not already done, enable the Google Cloud Dataproc API - * // and check the quota for your project at - * // https://console.developers.google.com/apis/api/dataproc - * // 2. This sample uses Application Default Credentials for - * authentication. - * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk and run - * // `gcloud beta auth application-default login`. - * // For more information, see - * // - * https://developers.google.com/identity/protocols/application-default-credentials - * // 3. Install the Node.js client library by running - * // `npm install googleapis --save` - * - * var google = require('googleapis'); - * var dataproc = google.dataproc('v1'); - * - * authorize(function(authClient) { - * var request = { - * // Required. The ID of the Google Cloud Platform project that the - * cluster belongs to. projectId: 'my-project-id', // TODO: Update - * placeholder value. - * - * // Required. The Cloud Dataproc region in which to handle the - * request. region: 'my-region', // TODO: Update placeholder value. - * - * resource: { - * // TODO: Add desired properties to the request body. - * }, - * - * auth: authClient, - * }; - * - * dataproc.projects.regions.clusters.create(request, function(err, - * response) { if (err) { console.error(err); return; - * } - * - * // TODO: Change code below to process the `response` object: - * console.log(JSON.stringify(response, null, 2)); - * }); - * }); - * - * function authorize(callback) { - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.error('authentication failed: ', err); - * return; - * } - * if (authClient.createScopedRequired && - * authClient.createScopedRequired()) { var scopes = - * ['https://www.googleapis.com/auth/cloud-platform']; authClient = - * authClient.createScoped(scopes); - * } - * callback(authClient); - * }); - * } - * @alias dataproc.projects.regions.clusters.create + * dataproc.projects.locations.workflowTemplates.instantiate + * @desc Instantiates a template and begins execution.The returned Operation + * can be used to track execution of workflow by polling operations.get. The + * Operation will complete when entire workflow is finished.The running + * workflow can be aborted via operations.cancel. This will cause any + * inflight jobs to be cancelled and workflow-owned clusters to be + * deleted.The Operation.metadata will be WorkflowMetadata.On successful + * completion, Operation.response will be Empty. + * @alias dataproc.projects.locations.workflowTemplates.instantiate * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.projectId Required. The ID of the Google Cloud Platform project that the cluster belongs to. - * @param {string} params.region Required. The Cloud Dataproc region in which to handle the request. - * @param {string=} params.requestId Optional. A unique id used to identify the request. If the server receives two CreateClusterRequest requests with the same id, then the second request will be ignored and the first google.longrunning.Operation created and stored in the backend is returned.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. - * @param {().Cluster} params.resource Request body data + * @param {string} params.name Required. The "resource name" of the workflow template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id} + * @param {().InstantiateWorkflowTemplateRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - create( - params?: Params$Resource$Projects$Regions$Clusters$Create, + instantiate( + params?: + Params$Resource$Projects$Locations$Workflowtemplates$Instantiate, options?: MethodOptions): AxiosPromise; - create( - params: Params$Resource$Projects$Regions$Clusters$Create, + instantiate( + params: + Params$Resource$Projects$Locations$Workflowtemplates$Instantiate, options: MethodOptions|BodyResponseCallback, callback: BodyResponseCallback): void; - create( - params: Params$Resource$Projects$Regions$Clusters$Create, + instantiate( + params: + Params$Resource$Projects$Locations$Workflowtemplates$Instantiate, callback: BodyResponseCallback): void; - create(callback: BodyResponseCallback): void; - create( - paramsOrCallback?: Params$Resource$Projects$Regions$Clusters$Create| + instantiate(callback: BodyResponseCallback): void; + instantiate( + paramsOrCallback?: + Params$Resource$Projects$Locations$Workflowtemplates$Instantiate| BodyResponseCallback, optionsOrCallback?: MethodOptions| BodyResponseCallback, callback?: BodyResponseCallback): void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Clusters$Create; + Params$Resource$Projects$Locations$Workflowtemplates$Instantiate; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Clusters$Create; + params = {} as + Params$Resource$Projects$Locations$Workflowtemplates$Instantiate; options = {}; } @@ -1847,15 +2057,14 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + - '/v1/projects/{projectId}/regions/{region}/clusters') + url: (rootUrl + '/v1/{+name}:instantiate') .replace(/([^:]\/)\/+/g, '$1'), method: 'POST' }, options), params, - requiredParams: ['projectId', 'region'], - pathParams: ['projectId', 'region'], + requiredParams: ['name'], + pathParams: ['name'], context: this.getRoot() }; if (callback) { @@ -1867,104 +2076,57 @@ export namespace dataproc_v1 { /** - * dataproc.projects.regions.clusters.delete - * @desc Deletes a cluster in a project. - * @example - * * // BEFORE RUNNING: - * // --------------- - * // 1. If not already done, enable the Google Cloud Dataproc API - * // and check the quota for your project at - * // https://console.developers.google.com/apis/api/dataproc - * // 2. This sample uses Application Default Credentials for - * authentication. - * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk and run - * // `gcloud beta auth application-default login`. - * // For more information, see - * // - * https://developers.google.com/identity/protocols/application-default-credentials - * // 3. Install the Node.js client library by running - * // `npm install googleapis --save` - * - * var google = require('googleapis'); - * var dataproc = google.dataproc('v1'); - * - * authorize(function(authClient) { - * var request = { - * // Required. The ID of the Google Cloud Platform project that the - * cluster belongs to. projectId: 'my-project-id', // TODO: Update - * placeholder value. - * - * // Required. The Cloud Dataproc region in which to handle the - * request. region: 'my-region', // TODO: Update placeholder value. - * - * // Required. The cluster name. - * clusterName: 'my-cluster-name', // TODO: Update placeholder value. - * - * auth: authClient, - * }; - * - * dataproc.projects.regions.clusters.delete(request, function(err, - * response) { if (err) { console.error(err); return; - * } - * - * // TODO: Change code below to process the `response` object: - * console.log(JSON.stringify(response, null, 2)); - * }); - * }); - * - * function authorize(callback) { - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.error('authentication failed: ', err); - * return; - * } - * if (authClient.createScopedRequired && - * authClient.createScopedRequired()) { var scopes = - * ['https://www.googleapis.com/auth/cloud-platform']; authClient = - * authClient.createScoped(scopes); - * } - * callback(authClient); - * }); - * } - * @alias dataproc.projects.regions.clusters.delete + * dataproc.projects.locations.workflowTemplates.instantiateInline + * @desc Instantiates a template and begins execution.This method is + * equivalent to executing the sequence CreateWorkflowTemplate, + * InstantiateWorkflowTemplate, DeleteWorkflowTemplate.The returned + * Operation can be used to track execution of workflow by polling + * operations.get. The Operation will complete when entire workflow is + * finished.The running workflow can be aborted via operations.cancel. This + * will cause any inflight jobs to be cancelled and workflow-owned clusters + * to be deleted.The Operation.metadata will be WorkflowMetadata.On + * successful completion, Operation.response will be Empty. + * @alias dataproc.projects.locations.workflowTemplates.instantiateInline * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterName Required. The cluster name. - * @param {string=} params.clusterUuid Optional. Specifying the cluster_uuid means the RPC should fail (with error NOT_FOUND) if cluster with specified UUID does not exist. - * @param {string} params.projectId Required. The ID of the Google Cloud Platform project that the cluster belongs to. - * @param {string} params.region Required. The Cloud Dataproc region in which to handle the request. - * @param {string=} params.requestId Optional. A unique id used to identify the request. If the server receives two DeleteClusterRequest requests with the same id, then the second request will be ignored and the first google.longrunning.Operation created and stored in the backend is returned.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. + * @param {string} params.parent Required. The "resource name" of the workflow template region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region} + * @param {string=} params.requestId Optional. A tag that prevents multiple concurrent workflow instances with the same tag from running. This mitigates risk of concurrent instances started due to retries.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. + * @param {().WorkflowTemplate} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - delete( - params?: Params$Resource$Projects$Regions$Clusters$Delete, + instantiateInline( + params?: + Params$Resource$Projects$Locations$Workflowtemplates$Instantiateinline, options?: MethodOptions): AxiosPromise; - delete( - params: Params$Resource$Projects$Regions$Clusters$Delete, + instantiateInline( + params: + Params$Resource$Projects$Locations$Workflowtemplates$Instantiateinline, options: MethodOptions|BodyResponseCallback, callback: BodyResponseCallback): void; - delete( - params: Params$Resource$Projects$Regions$Clusters$Delete, + instantiateInline( + params: + Params$Resource$Projects$Locations$Workflowtemplates$Instantiateinline, callback: BodyResponseCallback): void; - delete(callback: BodyResponseCallback): void; - delete( - paramsOrCallback?: Params$Resource$Projects$Regions$Clusters$Delete| + instantiateInline(callback: BodyResponseCallback): void; + instantiateInline( + paramsOrCallback?: + Params$Resource$Projects$Locations$Workflowtemplates$Instantiateinline| BodyResponseCallback, optionsOrCallback?: MethodOptions| BodyResponseCallback, callback?: BodyResponseCallback): void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Clusters$Delete; + Params$Resource$Projects$Locations$Workflowtemplates$Instantiateinline; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Clusters$Delete; + params = {} as + Params$Resource$Projects$Locations$Workflowtemplates$Instantiateinline; options = {}; } @@ -1977,16 +2139,15 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: - (rootUrl + - '/v1/projects/{projectId}/regions/{region}/clusters/{clusterName}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE' + url: (rootUrl + + '/v1/{+parent}/workflowTemplates:instantiateInline') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' }, options), params, - requiredParams: ['projectId', 'region', 'clusterName'], - pathParams: ['clusterName', 'projectId', 'region'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.getRoot() }; if (callback) { @@ -1998,108 +2159,51 @@ export namespace dataproc_v1 { /** - * dataproc.projects.regions.clusters.diagnose - * @desc Gets cluster diagnostic information. After the operation completes, - * the Operation.response field contains DiagnoseClusterOutputLocation. - * @example - * * // BEFORE RUNNING: - * // --------------- - * // 1. If not already done, enable the Google Cloud Dataproc API - * // and check the quota for your project at - * // https://console.developers.google.com/apis/api/dataproc - * // 2. This sample uses Application Default Credentials for - * authentication. - * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk and run - * // `gcloud beta auth application-default login`. - * // For more information, see - * // - * https://developers.google.com/identity/protocols/application-default-credentials - * // 3. Install the Node.js client library by running - * // `npm install googleapis --save` - * - * var google = require('googleapis'); - * var dataproc = google.dataproc('v1'); - * - * authorize(function(authClient) { - * var request = { - * // Required. The ID of the Google Cloud Platform project that the - * cluster belongs to. projectId: 'my-project-id', // TODO: Update - * placeholder value. - * - * // Required. The Cloud Dataproc region in which to handle the - * request. region: 'my-region', // TODO: Update placeholder value. - * - * // Required. The cluster name. - * clusterName: 'my-cluster-name', // TODO: Update placeholder value. - * - * resource: { - * // TODO: Add desired properties to the request body. - * }, - * - * auth: authClient, - * }; - * - * dataproc.projects.regions.clusters.diagnose(request, function(err, - * response) { if (err) { console.error(err); return; - * } - * - * // TODO: Change code below to process the `response` object: - * console.log(JSON.stringify(response, null, 2)); - * }); - * }); - * - * function authorize(callback) { - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.error('authentication failed: ', err); - * return; - * } - * if (authClient.createScopedRequired && - * authClient.createScopedRequired()) { var scopes = - * ['https://www.googleapis.com/auth/cloud-platform']; authClient = - * authClient.createScoped(scopes); - * } - * callback(authClient); - * }); - * } - * @alias dataproc.projects.regions.clusters.diagnose + * dataproc.projects.locations.workflowTemplates.list + * @desc Lists workflows that match the specified filter in the request. + * @alias dataproc.projects.locations.workflowTemplates.list * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterName Required. The cluster name. - * @param {string} params.projectId Required. The ID of the Google Cloud Platform project that the cluster belongs to. - * @param {string} params.region Required. The Cloud Dataproc region in which to handle the request. - * @param {().DiagnoseClusterRequest} params.resource Request body data + * @param {integer=} params.pageSize Optional. The maximum number of results to return in each response. + * @param {string=} params.pageToken Optional. The page token, returned by a previous call, to request the next page of results. + * @param {string} params.parent Required. The "resource name" of the region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region} * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - diagnose( - params?: Params$Resource$Projects$Regions$Clusters$Diagnose, - options?: MethodOptions): AxiosPromise; - diagnose( - params: Params$Resource$Projects$Regions$Clusters$Diagnose, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - diagnose( - params: Params$Resource$Projects$Regions$Clusters$Diagnose, - callback: BodyResponseCallback): void; - diagnose(callback: BodyResponseCallback): void; - diagnose( - paramsOrCallback?: Params$Resource$Projects$Regions$Clusters$Diagnose| - BodyResponseCallback, + list( + params?: Params$Resource$Projects$Locations$Workflowtemplates$List, + options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Projects$Locations$Workflowtemplates$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + list( + params: Params$Resource$Projects$Locations$Workflowtemplates$List, + callback: BodyResponseCallback): + void; + list(callback: BodyResponseCallback): + void; + list( + paramsOrCallback?: + Params$Resource$Projects$Locations$Workflowtemplates$List| + BodyResponseCallback, optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Clusters$Diagnose; + Params$Resource$Projects$Locations$Workflowtemplates$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Clusters$Diagnose; + params = {} as + Params$Resource$Projects$Locations$Workflowtemplates$List; options = {}; } @@ -2112,118 +2216,69 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: - (rootUrl + - '/v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' + url: (rootUrl + '/v1/{+parent}/workflowTemplates') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' }, options), params, - requiredParams: ['projectId', 'region', 'clusterName'], - pathParams: ['clusterName', 'projectId', 'region'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.getRoot() }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest( + parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters); } } /** - * dataproc.projects.regions.clusters.get - * @desc Gets the resource representation for a cluster in a project. - * @example - * * // BEFORE RUNNING: - * // --------------- - * // 1. If not already done, enable the Google Cloud Dataproc API - * // and check the quota for your project at - * // https://console.developers.google.com/apis/api/dataproc - * // 2. This sample uses Application Default Credentials for - * authentication. - * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk and run - * // `gcloud beta auth application-default login`. - * // For more information, see - * // - * https://developers.google.com/identity/protocols/application-default-credentials - * // 3. Install the Node.js client library by running - * // `npm install googleapis --save` - * - * var google = require('googleapis'); - * var dataproc = google.dataproc('v1'); - * - * authorize(function(authClient) { - * var request = { - * // Required. The ID of the Google Cloud Platform project that the - * cluster belongs to. projectId: 'my-project-id', // TODO: Update - * placeholder value. - * - * // Required. The Cloud Dataproc region in which to handle the - * request. region: 'my-region', // TODO: Update placeholder value. - * - * // Required. The cluster name. - * clusterName: 'my-cluster-name', // TODO: Update placeholder value. - * - * auth: authClient, - * }; - * - * dataproc.projects.regions.clusters.get(request, function(err, response) - * { if (err) { console.error(err); return; - * } - * - * // TODO: Change code below to process the `response` object: - * console.log(JSON.stringify(response, null, 2)); - * }); - * }); - * - * function authorize(callback) { - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.error('authentication failed: ', err); - * return; - * } - * if (authClient.createScopedRequired && - * authClient.createScopedRequired()) { var scopes = - * ['https://www.googleapis.com/auth/cloud-platform']; authClient = - * authClient.createScoped(scopes); - * } - * callback(authClient); - * }); - * } - * @alias dataproc.projects.regions.clusters.get - * @memberOf! () + * dataproc.projects.locations.workflowTemplates.setIamPolicy + * @desc Sets the access control policy on the specified resource. Replaces + * any existing policy. + * @alias dataproc.projects.locations.workflowTemplates.setIamPolicy + * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterName Required. The cluster name. - * @param {string} params.projectId Required. The ID of the Google Cloud Platform project that the cluster belongs to. - * @param {string} params.region Required. The Cloud Dataproc region in which to handle the request. + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * @param {().SetIamPolicyRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - get(params?: Params$Resource$Projects$Regions$Clusters$Get, - options?: MethodOptions): AxiosPromise; - get(params: Params$Resource$Projects$Regions$Clusters$Get, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - get(params: Params$Resource$Projects$Regions$Clusters$Get, - callback: BodyResponseCallback): void; - get(callback: BodyResponseCallback): void; - get(paramsOrCallback?: Params$Resource$Projects$Regions$Clusters$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + setIamPolicy( + params?: + Params$Resource$Projects$Locations$Workflowtemplates$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: + Params$Resource$Projects$Locations$Workflowtemplates$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: + Params$Resource$Projects$Locations$Workflowtemplates$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + Params$Resource$Projects$Locations$Workflowtemplates$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Clusters$Get; + Params$Resource$Projects$Locations$Workflowtemplates$Setiampolicy; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Clusters$Get; + params = {} as + Params$Resource$Projects$Locations$Workflowtemplates$Setiampolicy; options = {}; } @@ -2236,65 +2291,77 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: - (rootUrl + - '/v1/projects/{projectId}/regions/{region}/clusters/{clusterName}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' + url: (rootUrl + '/v1/{+resource}:setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' }, options), params, - requiredParams: ['projectId', 'region', 'clusterName'], - pathParams: ['clusterName', 'projectId', 'region'], + requiredParams: ['resource'], + pathParams: ['resource'], context: this.getRoot() }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * dataproc.projects.regions.clusters.getIamPolicy - * @desc Gets the access control policy for a resource. Returns an empty - * policy if the resource exists and does not have a policy set. - * @alias dataproc.projects.regions.clusters.getIamPolicy + * dataproc.projects.locations.workflowTemplates.testIamPermissions + * @desc Returns permissions that a caller has on the specified resource. If + * the resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error.Note: This operation is designed to be + * used for building permission-aware UIs and command-line tools, not for + * authorization checking. This operation may "fail open" without warning. + * @alias dataproc.projects.locations.workflowTemplates.testIamPermissions * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. - * @param {().GetIamPolicyRequest} params.resource Request body data + * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * @param {().TestIamPermissionsRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - getIamPolicy( - params?: Params$Resource$Projects$Regions$Clusters$Getiampolicy, - options?: MethodOptions): AxiosPromise; - getIamPolicy( - params: Params$Resource$Projects$Regions$Clusters$Getiampolicy, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - getIamPolicy( - params: Params$Resource$Projects$Regions$Clusters$Getiampolicy, - callback: BodyResponseCallback): void; - getIamPolicy(callback: BodyResponseCallback): void; - getIamPolicy( + testIamPermissions( + params?: + Params$Resource$Projects$Locations$Workflowtemplates$Testiampermissions, + options?: MethodOptions): + AxiosPromise; + testIamPermissions( + params: + Params$Resource$Projects$Locations$Workflowtemplates$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + testIamPermissions( + params: + Params$Resource$Projects$Locations$Workflowtemplates$Testiampermissions, + callback: BodyResponseCallback): + void; + testIamPermissions( + callback: BodyResponseCallback): + void; + testIamPermissions( paramsOrCallback?: - Params$Resource$Projects$Regions$Clusters$Getiampolicy| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + Params$Resource$Projects$Locations$Workflowtemplates$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Clusters$Getiampolicy; + Params$Resource$Projects$Locations$Workflowtemplates$Testiampermissions; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Clusters$Getiampolicy; + params = {} as + Params$Resource$Projects$Locations$Workflowtemplates$Testiampermissions; options = {}; } @@ -2307,7 +2374,7 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1/{+resource}:getIamPolicy') + url: (rootUrl + '/v1/{+resource}:testIamPermissions') .replace(/([^:]\/)\/+/g, '$1'), method: 'POST' }, @@ -2318,125 +2385,55 @@ export namespace dataproc_v1 { context: this.getRoot() }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest( + parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * dataproc.projects.regions.clusters.list - * @desc Lists all regions/{region}/clusters in a project. - * @example - * * // BEFORE RUNNING: - * // --------------- - * // 1. If not already done, enable the Google Cloud Dataproc API - * // and check the quota for your project at - * // https://console.developers.google.com/apis/api/dataproc - * // 2. This sample uses Application Default Credentials for - * authentication. - * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk and run - * // `gcloud beta auth application-default login`. - * // For more information, see - * // - * https://developers.google.com/identity/protocols/application-default-credentials - * // 3. Install the Node.js client library by running - * // `npm install googleapis --save` - * - * var google = require('googleapis'); - * var dataproc = google.dataproc('v1'); - * - * authorize(function(authClient) { - * var request = { - * // Required. The ID of the Google Cloud Platform project that the - * cluster belongs to. projectId: 'my-project-id', // TODO: Update - * placeholder value. - * - * // Required. The Cloud Dataproc region in which to handle the - * request. region: 'my-region', // TODO: Update placeholder value. - * - * auth: authClient, - * }; - * - * var handlePage = function(err, response) { - * if (err) { - * console.error(err); - * return; - * } - * - * var clustersPage = response['clusters']; - * if (!clustersPage) { - * return; - * } - * for (var i = 0; i < clustersPage.length; i++) { - * // TODO: Change code below to process each resource in - * `clustersPage`: console.log(JSON.stringify(clustersPage[i], null, 2)); - * } - * - * if (response.nextPageToken) { - * request.pageToken = response.nextPageToken; - * dataproc.projects.regions.clusters.list(request, handlePage); - * } - * }; - * - * dataproc.projects.regions.clusters.list(request, handlePage); - * }); - * - * function authorize(callback) { - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.error('authentication failed: ', err); - * return; - * } - * if (authClient.createScopedRequired && - * authClient.createScopedRequired()) { var scopes = - * ['https://www.googleapis.com/auth/cloud-platform']; authClient = - * authClient.createScoped(scopes); - * } - * callback(authClient); - * }); - * } - * @alias dataproc.projects.regions.clusters.list + * dataproc.projects.locations.workflowTemplates.update + * @desc Updates (replaces) workflow template. The updated template must + * contain version that matches the current server version. + * @alias dataproc.projects.locations.workflowTemplates.update * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.filter Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING and ERROR states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = * - * @param {integer=} params.pageSize Optional. The standard List page size. - * @param {string=} params.pageToken Optional. The standard List page token. - * @param {string} params.projectId Required. The ID of the Google Cloud Platform project that the cluster belongs to. - * @param {string} params.region Required. The Cloud Dataproc region in which to handle the request. + * @param {string} params.name Output only. The "resource name" of the template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id} + * @param {().WorkflowTemplate} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - list( - params?: Params$Resource$Projects$Regions$Clusters$List, - options?: MethodOptions): AxiosPromise; - list( - params: Params$Resource$Projects$Regions$Clusters$List, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Projects$Regions$Clusters$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Projects$Regions$Clusters$List| - BodyResponseCallback, + update( + params?: Params$Resource$Projects$Locations$Workflowtemplates$Update, + options?: MethodOptions): AxiosPromise; + update( + params: Params$Resource$Projects$Locations$Workflowtemplates$Update, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + update( + params: Params$Resource$Projects$Locations$Workflowtemplates$Update, + callback: BodyResponseCallback): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: + Params$Resource$Projects$Locations$Workflowtemplates$Update| + BodyResponseCallback, optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Clusters$List; + Params$Resource$Projects$Locations$Workflowtemplates$Update; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Clusters$List; + params = {} as + Params$Resource$Projects$Locations$Workflowtemplates$Update; options = {}; } @@ -2449,28 +2446,255 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + - '/v1/projects/{projectId}/regions/{region}/clusters') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT' }, options), params, - requiredParams: ['projectId', 'region'], - pathParams: ['projectId', 'region'], + requiredParams: ['name'], + pathParams: ['name'], context: this.getRoot() }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } + } + export interface Params$Resource$Projects$Locations$Workflowtemplates$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * dataproc.projects.regions.clusters.patch - * @desc Updates a cluster in a project. + * Required. The "resource name" of the region, as described in + * https://cloud.google.com/apis/design/resource_names of the form + * projects/{project_id}/regions/{region} + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$WorkflowTemplate; + } + export interface Params$Resource$Projects$Locations$Workflowtemplates$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The "resource name" of the workflow template, as described in + * https://cloud.google.com/apis/design/resource_names of the form + * projects/{project_id}/regions/{region}/workflowTemplates/{template_id} + */ + name?: string; + /** + * Optional. The version of workflow template to delete. If specified, will + * only delete the template if the current server version matches specified + * version. + */ + version?: number; + } + export interface Params$Resource$Projects$Locations$Workflowtemplates$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The "resource name" of the workflow template, as described in + * https://cloud.google.com/apis/design/resource_names of the form + * projects/{project_id}/regions/{region}/workflowTemplates/{template_id} + */ + name?: string; + /** + * Optional. The version of workflow template to retrieve. Only previously + * instatiated versions can be retrieved.If unspecified, retrieves the + * current version. + */ + version?: number; + } + export interface Params$Resource$Projects$Locations$Workflowtemplates$Getiampolicy { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy is being requested. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GetIamPolicyRequest; + } + export interface Params$Resource$Projects$Locations$Workflowtemplates$Instantiate { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The "resource name" of the workflow template, as described in + * https://cloud.google.com/apis/design/resource_names of the form + * projects/{project_id}/regions/{region}/workflowTemplates/{template_id} + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstantiateWorkflowTemplateRequest; + } + export interface Params$Resource$Projects$Locations$Workflowtemplates$Instantiateinline { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The "resource name" of the workflow template region, as + * described in https://cloud.google.com/apis/design/resource_names of the + * form projects/{project_id}/regions/{region} + */ + parent?: string; + /** + * Optional. A tag that prevents multiple concurrent workflow instances with + * the same tag from running. This mitigates risk of concurrent instances + * started due to retries.It is recommended to always set this value to a + * UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The + * tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), + * and hyphens (-). The maximum length is 40 characters. + */ + requestId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$WorkflowTemplate; + } + export interface Params$Resource$Projects$Locations$Workflowtemplates$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Optional. The maximum number of results to return in each response. + */ + pageSize?: number; + /** + * Optional. The page token, returned by a previous call, to request the + * next page of results. + */ + pageToken?: string; + /** + * Required. The "resource name" of the region, as described in + * https://cloud.google.com/apis/design/resource_names of the form + * projects/{project_id}/regions/{region} + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Workflowtemplates$Setiampolicy { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy is being specified. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Locations$Workflowtemplates$Testiampermissions { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + export interface Params$Resource$Projects$Locations$Workflowtemplates$Update { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Output only. The "resource name" of the template, as described in + * https://cloud.google.com/apis/design/resource_names of the form + * projects/{project_id}/regions/{region}/workflowTemplates/{template_id} + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$WorkflowTemplate; + } + + + + export class Resource$Projects$Regions { + root: Dataproc; + clusters: Resource$Projects$Regions$Clusters; + jobs: Resource$Projects$Regions$Jobs; + operations: Resource$Projects$Regions$Operations; + workflowTemplates: Resource$Projects$Regions$Workflowtemplates; + constructor(root: Dataproc) { + this.root = root; + this.getRoot.bind(this); + this.clusters = new Resource$Projects$Regions$Clusters(root); + this.jobs = new Resource$Projects$Regions$Jobs(root); + this.operations = new Resource$Projects$Regions$Operations(root); + this.workflowTemplates = + new Resource$Projects$Regions$Workflowtemplates(root); + } + + getRoot() { + return this.root; + } + } + + + export class Resource$Projects$Regions$Clusters { + root: Dataproc; + constructor(root: Dataproc) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * dataproc.projects.regions.clusters.create + * @desc Creates a cluster in a project. * @example * * // BEFORE RUNNING: * // --------------- @@ -2493,26 +2717,21 @@ export namespace dataproc_v1 { * * authorize(function(authClient) { * var request = { - * // Required. The ID of the Google Cloud Platform project the cluster - * belongs to. projectId: 'my-project-id', // TODO: Update placeholder - * value. + * // Required. The ID of the Google Cloud Platform project that the + * cluster belongs to. projectId: 'my-project-id', // TODO: Update + * placeholder value. * * // Required. The Cloud Dataproc region in which to handle the * request. region: 'my-region', // TODO: Update placeholder value. * - * // Required. The cluster name. - * clusterName: 'my-cluster-name', // TODO: Update placeholder value. - * * resource: { - * // TODO: Add desired properties to the request body. Only these - * properties - * // will be changed. + * // TODO: Add desired properties to the request body. * }, * * auth: authClient, * }; * - * dataproc.projects.regions.clusters.patch(request, function(err, + * dataproc.projects.regions.clusters.create(request, function(err, * response) { if (err) { console.error(err); return; * } * @@ -2535,46 +2754,43 @@ export namespace dataproc_v1 { * callback(authClient); * }); * } - * @alias dataproc.projects.regions.clusters.patch + * @alias dataproc.projects.regions.clusters.create * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterName Required. The cluster name. - * @param {string=} params.gracefulDecommissionTimeout Optional. Timeout for graceful YARN decomissioning. Graceful decommissioning allows removing nodes from the cluster without interrupting jobs in progress. Timeout specifies how long to wait for jobs in progress to finish before forcefully removing nodes (and potentially interrupting jobs). Default timeout is 0 (for forceful decommission), and the maximum allowed timeout is 1 day.Only supported on Dataproc image versions 1.2 and higher. - * @param {string} params.projectId Required. The ID of the Google Cloud Platform project the cluster belongs to. + * @param {string} params.projectId Required. The ID of the Google Cloud Platform project that the cluster belongs to. * @param {string} params.region Required. The Cloud Dataproc region in which to handle the request. - * @param {string=} params.requestId Optional. A unique id used to identify the request. If the server receives two UpdateClusterRequest requests with the same id, then the second request will be ignored and the first google.longrunning.Operation created and stored in the backend is returned.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. - * @param {string=} params.updateMask Required. Specifies the path, relative to Cluster, of the field to update. For example, to change the number of workers in a cluster to 5, the update_mask parameter would be specified as config.worker_config.num_instances, and the PATCH request body would specify the new value, as follows: { "config":{ "workerConfig":{ "numInstances":"5" } } } Similarly, to change the number of preemptible workers in a cluster to 5, the update_mask parameter would be config.secondary_worker_config.num_instances, and the PATCH request body would be set as follows: { "config":{ "secondaryWorkerConfig":{ "numInstances":"5" } } } Note: Currently, only the following fields can be updated:
Mask Purpose
labels Update labels
config.worker_config.num_instances Resize primary worker group
config.secondary_worker_config.num_instances Resize secondary worker group
+ * @param {string=} params.requestId Optional. A unique id used to identify the request. If the server receives two CreateClusterRequest requests with the same id, then the second request will be ignored and the first google.longrunning.Operation created and stored in the backend is returned.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. * @param {().Cluster} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - patch( - params?: Params$Resource$Projects$Regions$Clusters$Patch, + create( + params?: Params$Resource$Projects$Regions$Clusters$Create, options?: MethodOptions): AxiosPromise; - patch( - params: Params$Resource$Projects$Regions$Clusters$Patch, + create( + params: Params$Resource$Projects$Regions$Clusters$Create, options: MethodOptions|BodyResponseCallback, callback: BodyResponseCallback): void; - patch( - params: Params$Resource$Projects$Regions$Clusters$Patch, + create( + params: Params$Resource$Projects$Regions$Clusters$Create, callback: BodyResponseCallback): void; - patch(callback: BodyResponseCallback): void; - patch( - paramsOrCallback?: Params$Resource$Projects$Regions$Clusters$Patch| + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Projects$Regions$Clusters$Create| BodyResponseCallback, optionsOrCallback?: MethodOptions| BodyResponseCallback, callback?: BodyResponseCallback): void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Clusters$Patch; + Params$Resource$Projects$Regions$Clusters$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Clusters$Patch; + params = {} as Params$Resource$Projects$Regions$Clusters$Create; options = {}; } @@ -2587,16 +2803,15 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: - (rootUrl + - '/v1/projects/{projectId}/regions/{region}/clusters/{clusterName}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH' + url: (rootUrl + + '/v1/projects/{projectId}/regions/{region}/clusters') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' }, options), params, - requiredParams: ['projectId', 'region', 'clusterName'], - pathParams: ['clusterName', 'projectId', 'region'], + requiredParams: ['projectId', 'region'], + pathParams: ['projectId', 'region'], context: this.getRoot() }; if (callback) { @@ -2608,44 +2823,104 @@ export namespace dataproc_v1 { /** - * dataproc.projects.regions.clusters.setIamPolicy - * @desc Sets the access control policy on the specified resource. Replaces - * any existing policy. - * @alias dataproc.projects.regions.clusters.setIamPolicy + * dataproc.projects.regions.clusters.delete + * @desc Deletes a cluster in a project. + * @example + * * // BEFORE RUNNING: + * // --------------- + * // 1. If not already done, enable the Google Cloud Dataproc API + * // and check the quota for your project at + * // https://console.developers.google.com/apis/api/dataproc + * // 2. This sample uses Application Default Credentials for + * authentication. + * // If not already done, install the gcloud CLI from + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login`. + * // For more information, see + * // + * https://developers.google.com/identity/protocols/application-default-credentials + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * + * var google = require('googleapis'); + * var dataproc = google.dataproc('v1'); + * + * authorize(function(authClient) { + * var request = { + * // Required. The ID of the Google Cloud Platform project that the + * cluster belongs to. projectId: 'my-project-id', // TODO: Update + * placeholder value. + * + * // Required. The Cloud Dataproc region in which to handle the + * request. region: 'my-region', // TODO: Update placeholder value. + * + * // Required. The cluster name. + * clusterName: 'my-cluster-name', // TODO: Update placeholder value. + * + * auth: authClient, + * }; + * + * dataproc.projects.regions.clusters.delete(request, function(err, + * response) { if (err) { console.error(err); return; + * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); + * }); + * }); + * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient) { + * if (err) { + * console.error('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && + * authClient.createScopedRequired()) { var scopes = + * ['https://www.googleapis.com/auth/cloud-platform']; authClient = + * authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * @alias dataproc.projects.regions.clusters.delete * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. - * @param {().SetIamPolicyRequest} params.resource Request body data + * @param {string} params.clusterName Required. The cluster name. + * @param {string=} params.clusterUuid Optional. Specifying the cluster_uuid means the RPC should fail (with error NOT_FOUND) if cluster with specified UUID does not exist. + * @param {string} params.projectId Required. The ID of the Google Cloud Platform project that the cluster belongs to. + * @param {string} params.region Required. The Cloud Dataproc region in which to handle the request. + * @param {string=} params.requestId Optional. A unique id used to identify the request. If the server receives two DeleteClusterRequest requests with the same id, then the second request will be ignored and the first google.longrunning.Operation created and stored in the backend is returned.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - setIamPolicy( - params?: Params$Resource$Projects$Regions$Clusters$Setiampolicy, - options?: MethodOptions): AxiosPromise; - setIamPolicy( - params: Params$Resource$Projects$Regions$Clusters$Setiampolicy, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - setIamPolicy( - params: Params$Resource$Projects$Regions$Clusters$Setiampolicy, - callback: BodyResponseCallback): void; - setIamPolicy(callback: BodyResponseCallback): void; - setIamPolicy( - paramsOrCallback?: - Params$Resource$Projects$Regions$Clusters$Setiampolicy| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + delete( + params?: Params$Resource$Projects$Regions$Clusters$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Projects$Regions$Clusters$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Projects$Regions$Clusters$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Projects$Regions$Clusters$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Clusters$Setiampolicy; + Params$Resource$Projects$Regions$Clusters$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Clusters$Setiampolicy; + params = {} as Params$Resource$Projects$Regions$Clusters$Delete; options = {}; } @@ -2658,74 +2933,129 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1/{+resource}:setIamPolicy') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' + url: + (rootUrl + + '/v1/projects/{projectId}/regions/{region}/clusters/{clusterName}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' }, options), params, - requiredParams: ['resource'], - pathParams: ['resource'], + requiredParams: ['projectId', 'region', 'clusterName'], + pathParams: ['clusterName', 'projectId', 'region'], context: this.getRoot() }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * dataproc.projects.regions.clusters.testIamPermissions - * @desc Returns permissions that a caller has on the specified resource. If - * the resource does not exist, this will return an empty set of - * permissions, not a NOT_FOUND error.Note: This operation is designed to be - * used for building permission-aware UIs and command-line tools, not for - * authorization checking. This operation may "fail open" without warning. - * @alias dataproc.projects.regions.clusters.testIamPermissions + * dataproc.projects.regions.clusters.diagnose + * @desc Gets cluster diagnostic information. After the operation completes, + * the Operation.response field contains DiagnoseClusterOutputLocation. + * @example + * * // BEFORE RUNNING: + * // --------------- + * // 1. If not already done, enable the Google Cloud Dataproc API + * // and check the quota for your project at + * // https://console.developers.google.com/apis/api/dataproc + * // 2. This sample uses Application Default Credentials for + * authentication. + * // If not already done, install the gcloud CLI from + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login`. + * // For more information, see + * // + * https://developers.google.com/identity/protocols/application-default-credentials + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * + * var google = require('googleapis'); + * var dataproc = google.dataproc('v1'); + * + * authorize(function(authClient) { + * var request = { + * // Required. The ID of the Google Cloud Platform project that the + * cluster belongs to. projectId: 'my-project-id', // TODO: Update + * placeholder value. + * + * // Required. The Cloud Dataproc region in which to handle the + * request. region: 'my-region', // TODO: Update placeholder value. + * + * // Required. The cluster name. + * clusterName: 'my-cluster-name', // TODO: Update placeholder value. + * + * resource: { + * // TODO: Add desired properties to the request body. + * }, + * + * auth: authClient, + * }; + * + * dataproc.projects.regions.clusters.diagnose(request, function(err, + * response) { if (err) { console.error(err); return; + * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); + * }); + * }); + * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient) { + * if (err) { + * console.error('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && + * authClient.createScopedRequired()) { var scopes = + * ['https://www.googleapis.com/auth/cloud-platform']; authClient = + * authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * @alias dataproc.projects.regions.clusters.diagnose * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. - * @param {().TestIamPermissionsRequest} params.resource Request body data + * @param {string} params.clusterName Required. The cluster name. + * @param {string} params.projectId Required. The ID of the Google Cloud Platform project that the cluster belongs to. + * @param {string} params.region Required. The Cloud Dataproc region in which to handle the request. + * @param {().DiagnoseClusterRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - testIamPermissions( - params?: Params$Resource$Projects$Regions$Clusters$Testiampermissions, - options?: MethodOptions): - AxiosPromise; - testIamPermissions( - params: Params$Resource$Projects$Regions$Clusters$Testiampermissions, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): - void; - testIamPermissions( - params: Params$Resource$Projects$Regions$Clusters$Testiampermissions, - callback: BodyResponseCallback): - void; - testIamPermissions( - callback: BodyResponseCallback): - void; - testIamPermissions( - paramsOrCallback?: - Params$Resource$Projects$Regions$Clusters$Testiampermissions| - BodyResponseCallback, + diagnose( + params?: Params$Resource$Projects$Regions$Clusters$Diagnose, + options?: MethodOptions): AxiosPromise; + diagnose( + params: Params$Resource$Projects$Regions$Clusters$Diagnose, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + diagnose( + params: Params$Resource$Projects$Regions$Clusters$Diagnose, + callback: BodyResponseCallback): void; + diagnose(callback: BodyResponseCallback): void; + diagnose( + paramsOrCallback?: Params$Resource$Projects$Regions$Clusters$Diagnose| + BodyResponseCallback, optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Clusters$Testiampermissions; + Params$Resource$Projects$Regions$Clusters$Diagnose; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as - Params$Resource$Projects$Regions$Clusters$Testiampermissions; + params = {} as Params$Resource$Projects$Regions$Clusters$Diagnose; options = {}; } @@ -2738,314 +3068,222 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1/{+resource}:testIamPermissions') - .replace(/([^:]\/)\/+/g, '$1'), + url: + (rootUrl + + '/v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose') + .replace(/([^:]\/)\/+/g, '$1'), method: 'POST' }, options), params, - requiredParams: ['resource'], - pathParams: ['resource'], + requiredParams: ['projectId', 'region', 'clusterName'], + pathParams: ['clusterName', 'projectId', 'region'], context: this.getRoot() }; if (callback) { - createAPIRequest( - parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } - } - - export interface Params$Resource$Projects$Regions$Clusters$Create { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - */ - projectId?: string; - /** - * Required. The Cloud Dataproc region in which to handle the request. - */ - region?: string; - /** - * Optional. A unique id used to identify the request. If the server - * receives two CreateClusterRequest requests with the same id, then the - * second request will be ignored and the first google.longrunning.Operation - * created and stored in the backend is returned.It is recommended to always - * set this value to a UUID - * (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must - * contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and - * hyphens (-). The maximum length is 40 characters. - */ - requestId?: string; - /** - * Request body metadata - */ - requestBody?: Schema$Cluster; - } - export interface Params$Resource$Projects$Regions$Clusters$Delete { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Required. The cluster name. - */ - clusterName?: string; - /** - * Optional. Specifying the cluster_uuid means the RPC should fail (with - * error NOT_FOUND) if cluster with specified UUID does not exist. - */ - clusterUuid?: string; - /** - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - */ - projectId?: string; - /** - * Required. The Cloud Dataproc region in which to handle the request. - */ - region?: string; - /** - * Optional. A unique id used to identify the request. If the server - * receives two DeleteClusterRequest requests with the same id, then the - * second request will be ignored and the first google.longrunning.Operation - * created and stored in the backend is returned.It is recommended to always - * set this value to a UUID - * (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must - * contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and - * hyphens (-). The maximum length is 40 characters. - */ - requestId?: string; - } - export interface Params$Resource$Projects$Regions$Clusters$Diagnose { - /** - * Auth client or API Key for the request + * dataproc.projects.regions.clusters.get + * @desc Gets the resource representation for a cluster in a project. + * @example + * * // BEFORE RUNNING: + * // --------------- + * // 1. If not already done, enable the Google Cloud Dataproc API + * // and check the quota for your project at + * // https://console.developers.google.com/apis/api/dataproc + * // 2. This sample uses Application Default Credentials for + * authentication. + * // If not already done, install the gcloud CLI from + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login`. + * // For more information, see + * // + * https://developers.google.com/identity/protocols/application-default-credentials + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * + * var google = require('googleapis'); + * var dataproc = google.dataproc('v1'); + * + * authorize(function(authClient) { + * var request = { + * // Required. The ID of the Google Cloud Platform project that the + * cluster belongs to. projectId: 'my-project-id', // TODO: Update + * placeholder value. + * + * // Required. The Cloud Dataproc region in which to handle the + * request. region: 'my-region', // TODO: Update placeholder value. + * + * // Required. The cluster name. + * clusterName: 'my-cluster-name', // TODO: Update placeholder value. + * + * auth: authClient, + * }; + * + * dataproc.projects.regions.clusters.get(request, function(err, response) + * { if (err) { console.error(err); return; + * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); + * }); + * }); + * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient) { + * if (err) { + * console.error('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && + * authClient.createScopedRequired()) { var scopes = + * ['https://www.googleapis.com/auth/cloud-platform']; authClient = + * authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * @alias dataproc.projects.regions.clusters.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.clusterName Required. The cluster name. + * @param {string} params.projectId Required. The ID of the Google Cloud Platform project that the cluster belongs to. + * @param {string} params.region Required. The Cloud Dataproc region in which to handle the request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + get(params?: Params$Resource$Projects$Regions$Clusters$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Projects$Regions$Clusters$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Projects$Regions$Clusters$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Projects$Regions$Clusters$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Regions$Clusters$Get; + let options = (optionsOrCallback || {}) as MethodOptions; - /** - * Required. The cluster name. - */ - clusterName?: string; - /** - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - */ - projectId?: string; - /** - * Required. The Cloud Dataproc region in which to handle the request. - */ - region?: string; + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Regions$Clusters$Get; + options = {}; + } - /** - * Request body metadata - */ - requestBody?: Schema$DiagnoseClusterRequest; - } - export interface Params$Resource$Projects$Regions$Clusters$Get { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } - /** - * Required. The cluster name. - */ - clusterName?: string; - /** - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - */ - projectId?: string; - /** - * Required. The Cloud Dataproc region in which to handle the request. - */ - region?: string; - } - export interface Params$Resource$Projects$Regions$Clusters$Getiampolicy { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + const rootUrl = options.rootUrl || 'https://dataproc.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/v1/projects/{projectId}/regions/{region}/clusters/{clusterName}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['projectId', 'region', 'clusterName'], + pathParams: ['clusterName', 'projectId', 'region'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } - /** - * REQUIRED: The resource for which the policy is being requested. See the - * operation documentation for the appropriate value for this field. - */ - resource?: string; /** - * Request body metadata + * dataproc.projects.regions.clusters.getIamPolicy + * @desc Gets the access control policy for a resource. Returns an empty + * policy if the resource exists and does not have a policy set. + * @alias dataproc.projects.regions.clusters.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + * @param {().GetIamPolicyRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object */ - requestBody?: Schema$GetIamPolicyRequest; - } - export interface Params$Resource$Projects$Regions$Clusters$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Optional. A filter constraining the clusters to list. Filters are - * case-sensitive and have the following syntax:field = value AND field = - * value ...where field is one of status.state, clusterName, or - * labels.[KEY], and [KEY] is a label key. value can be * to match all - * values. status.state can be one of the following: ACTIVE, INACTIVE, - * CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the - * CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING - * and ERROR states. clusterName is the name of the cluster provided at - * creation time. Only the logical AND operator is supported; - * space-separated items are treated as having an implicit AND - * operator.Example filter:status.state = ACTIVE AND clusterName = mycluster - * AND labels.env = staging AND labels.starred = * - */ - filter?: string; - /** - * Optional. The standard List page size. - */ - pageSize?: number; - /** - * Optional. The standard List page token. - */ - pageToken?: string; - /** - * Required. The ID of the Google Cloud Platform project that the cluster - * belongs to. - */ - projectId?: string; - /** - * Required. The Cloud Dataproc region in which to handle the request. - */ - region?: string; - } - export interface Params$Resource$Projects$Regions$Clusters$Patch { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Required. The cluster name. - */ - clusterName?: string; - /** - * Optional. Timeout for graceful YARN decomissioning. Graceful - * decommissioning allows removing nodes from the cluster without - * interrupting jobs in progress. Timeout specifies how long to wait for - * jobs in progress to finish before forcefully removing nodes (and - * potentially interrupting jobs). Default timeout is 0 (for forceful - * decommission), and the maximum allowed timeout is 1 day.Only supported on - * Dataproc image versions 1.2 and higher. - */ - gracefulDecommissionTimeout?: string; - /** - * Required. The ID of the Google Cloud Platform project the cluster belongs - * to. - */ - projectId?: string; - /** - * Required. The Cloud Dataproc region in which to handle the request. - */ - region?: string; - /** - * Optional. A unique id used to identify the request. If the server - * receives two UpdateClusterRequest requests with the same id, then the - * second request will be ignored and the first google.longrunning.Operation - * created and stored in the backend is returned.It is recommended to always - * set this value to a UUID - * (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must - * contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and - * hyphens (-). The maximum length is 40 characters. - */ - requestId?: string; - /** - * Required. Specifies the path, relative to Cluster, of the field to - * update. For example, to change the number of workers in a cluster to 5, - * the update_mask parameter would be specified as - * config.worker_config.num_instances, and the PATCH request body would - * specify the new value, as follows: { "config":{ "workerConfig":{ - * "numInstances":"5" } } } Similarly, to change the number of - * preemptible workers in a cluster to 5, the update_mask parameter would be - * config.secondary_worker_config.num_instances, and the PATCH request body - * would be set as follows: { "config":{ "secondaryWorkerConfig":{ - * "numInstances":"5" } } } Note: Currently, only the - * following fields can be updated: - * - * - * - * - * - * - *
Mask Purpose
labels Update labels
config.worker_config.num_instancesResize primary worker group
config.secondary_worker_config.num_instancesResize secondary worker group
- */ - updateMask?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$Cluster; - } - export interface Params$Resource$Projects$Regions$Clusters$Setiampolicy { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * REQUIRED: The resource for which the policy is being specified. See the - * operation documentation for the appropriate value for this field. - */ - resource?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$SetIamPolicyRequest; - } - export interface Params$Resource$Projects$Regions$Clusters$Testiampermissions { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - */ - resource?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$TestIamPermissionsRequest; - } + getIamPolicy( + params?: Params$Resource$Projects$Regions$Clusters$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Regions$Clusters$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Projects$Regions$Clusters$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + Params$Resource$Projects$Regions$Clusters$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Regions$Clusters$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Regions$Clusters$Getiampolicy; + options = {}; + } - export class Resource$Projects$Regions$Jobs { - root: Dataproc; - constructor(root: Dataproc) { - this.root = root; - this.getRoot.bind(this); - } + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } - getRoot() { - return this.root; + const rootUrl = options.rootUrl || 'https://dataproc.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } } /** - * dataproc.projects.regions.jobs.cancel - * @desc Starts a job cancellation request. To access the job resource after - * cancellation, call regions/{region}/jobs.list or - * regions/{region}/jobs.get. + * dataproc.projects.regions.clusters.list + * @desc Lists all regions/{region}/clusters in a project. * @example * * // BEFORE RUNNING: * // --------------- @@ -3068,30 +3306,38 @@ export namespace dataproc_v1 { * * authorize(function(authClient) { * var request = { - * // Required. The ID of the Google Cloud Platform project that the job - * belongs to. projectId: 'my-project-id', // TODO: Update placeholder - * value. + * // Required. The ID of the Google Cloud Platform project that the + * cluster belongs to. projectId: 'my-project-id', // TODO: Update + * placeholder value. * * // Required. The Cloud Dataproc region in which to handle the * request. region: 'my-region', // TODO: Update placeholder value. * - * // Required. The job ID. - * jobId: 'my-job-id', // TODO: Update placeholder value. - * - * resource: { - * // TODO: Add desired properties to the request body. - * }, - * * auth: authClient, * }; * - * dataproc.projects.regions.jobs.cancel(request, function(err, response) - * { if (err) { console.error(err); return; + * var handlePage = function(err, response) { + * if (err) { + * console.error(err); + * return; * } * - * // TODO: Change code below to process the `response` object: - * console.log(JSON.stringify(response, null, 2)); - * }); + * var clustersPage = response['clusters']; + * if (!clustersPage) { + * return; + * } + * for (var i = 0; i < clustersPage.length; i++) { + * // TODO: Change code below to process each resource in + * `clustersPage`: console.log(JSON.stringify(clustersPage[i], null, 2)); + * } + * + * if (response.nextPageToken) { + * request.pageToken = response.nextPageToken; + * dataproc.projects.regions.clusters.list(request, handlePage); + * } + * }; + * + * dataproc.projects.regions.clusters.list(request, handlePage); * }); * * function authorize(callback) { @@ -3108,42 +3354,45 @@ export namespace dataproc_v1 { * callback(authClient); * }); * } - * @alias dataproc.projects.regions.jobs.cancel + * @alias dataproc.projects.regions.clusters.list * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.jobId Required. The job ID. - * @param {string} params.projectId Required. The ID of the Google Cloud Platform project that the job belongs to. + * @param {string=} params.filter Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING and ERROR states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = * + * @param {integer=} params.pageSize Optional. The standard List page size. + * @param {string=} params.pageToken Optional. The standard List page token. + * @param {string} params.projectId Required. The ID of the Google Cloud Platform project that the cluster belongs to. * @param {string} params.region Required. The Cloud Dataproc region in which to handle the request. - * @param {().CancelJobRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - cancel( - params?: Params$Resource$Projects$Regions$Jobs$Cancel, - options?: MethodOptions): AxiosPromise; - cancel( - params: Params$Resource$Projects$Regions$Jobs$Cancel, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - cancel( - params: Params$Resource$Projects$Regions$Jobs$Cancel, - callback: BodyResponseCallback): void; - cancel(callback: BodyResponseCallback): void; - cancel( - paramsOrCallback?: Params$Resource$Projects$Regions$Jobs$Cancel| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + list( + params?: Params$Resource$Projects$Regions$Clusters$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Projects$Regions$Clusters$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Projects$Regions$Clusters$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Projects$Regions$Clusters$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Jobs$Cancel; + Params$Resource$Projects$Regions$Clusters$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Jobs$Cancel; + params = {} as Params$Resource$Projects$Regions$Clusters$List; options = {}; } @@ -3156,30 +3405,28 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: - (rootUrl + - '/v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' + url: (rootUrl + + '/v1/projects/{projectId}/regions/{region}/clusters') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' }, options), params, - requiredParams: ['projectId', 'region', 'jobId'], - pathParams: ['jobId', 'projectId', 'region'], + requiredParams: ['projectId', 'region'], + pathParams: ['projectId', 'region'], context: this.getRoot() }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * dataproc.projects.regions.jobs.delete - * @desc Deletes the job from the project. If the job is active, the delete - * fails, and the response returns FAILED_PRECONDITION. + * dataproc.projects.regions.clusters.patch + * @desc Updates a cluster in a project. * @example * * // BEFORE RUNNING: * // --------------- @@ -3202,24 +3449,31 @@ export namespace dataproc_v1 { * * authorize(function(authClient) { * var request = { - * // Required. The ID of the Google Cloud Platform project that the job + * // Required. The ID of the Google Cloud Platform project the cluster * belongs to. projectId: 'my-project-id', // TODO: Update placeholder * value. * * // Required. The Cloud Dataproc region in which to handle the * request. region: 'my-region', // TODO: Update placeholder value. * - * // Required. The job ID. - * jobId: 'my-job-id', // TODO: Update placeholder value. + * // Required. The cluster name. + * clusterName: 'my-cluster-name', // TODO: Update placeholder value. + * + * resource: { + * // TODO: Add desired properties to the request body. Only these + * properties + * // will be changed. + * }, * * auth: authClient, * }; * - * dataproc.projects.regions.jobs.delete(request, function(err) { - * if (err) { - * console.error(err); - * return; + * dataproc.projects.regions.clusters.patch(request, function(err, + * response) { if (err) { console.error(err); return; * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); * }); * }); * @@ -3237,41 +3491,46 @@ export namespace dataproc_v1 { * callback(authClient); * }); * } - * @alias dataproc.projects.regions.jobs.delete + * @alias dataproc.projects.regions.clusters.patch * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.jobId Required. The job ID. - * @param {string} params.projectId Required. The ID of the Google Cloud Platform project that the job belongs to. + * @param {string} params.clusterName Required. The cluster name. + * @param {string=} params.gracefulDecommissionTimeout Optional. Timeout for graceful YARN decomissioning. Graceful decommissioning allows removing nodes from the cluster without interrupting jobs in progress. Timeout specifies how long to wait for jobs in progress to finish before forcefully removing nodes (and potentially interrupting jobs). Default timeout is 0 (for forceful decommission), and the maximum allowed timeout is 1 day.Only supported on Dataproc image versions 1.2 and higher. + * @param {string} params.projectId Required. The ID of the Google Cloud Platform project the cluster belongs to. * @param {string} params.region Required. The Cloud Dataproc region in which to handle the request. + * @param {string=} params.requestId Optional. A unique id used to identify the request. If the server receives two UpdateClusterRequest requests with the same id, then the second request will be ignored and the first google.longrunning.Operation created and stored in the backend is returned.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. + * @param {string=} params.updateMask Required. Specifies the path, relative to Cluster, of the field to update. For example, to change the number of workers in a cluster to 5, the update_mask parameter would be specified as config.worker_config.num_instances, and the PATCH request body would specify the new value, as follows: { "config":{ "workerConfig":{ "numInstances":"5" } } } Similarly, to change the number of preemptible workers in a cluster to 5, the update_mask parameter would be config.secondary_worker_config.num_instances, and the PATCH request body would be set as follows: { "config":{ "secondaryWorkerConfig":{ "numInstances":"5" } } } Note: Currently, only the following fields can be updated:
Mask Purpose
labels Update labels
config.worker_config.num_instances Resize primary worker group
config.secondary_worker_config.num_instances Resize secondary worker group
+ * @param {().Cluster} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - delete( - params?: Params$Resource$Projects$Regions$Jobs$Delete, - options?: MethodOptions): AxiosPromise; - delete( - params: Params$Resource$Projects$Regions$Jobs$Delete, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - delete( - params: Params$Resource$Projects$Regions$Jobs$Delete, - callback: BodyResponseCallback): void; - delete(callback: BodyResponseCallback): void; - delete( - paramsOrCallback?: Params$Resource$Projects$Regions$Jobs$Delete| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + patch( + params?: Params$Resource$Projects$Regions$Clusters$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Projects$Regions$Clusters$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Projects$Regions$Clusters$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Projects$Regions$Clusters$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Jobs$Delete; + Params$Resource$Projects$Regions$Clusters$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Jobs$Delete; + params = {} as Params$Resource$Projects$Regions$Clusters$Patch; options = {}; } @@ -3284,119 +3543,65 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + - '/v1/projects/{projectId}/regions/{region}/jobs/{jobId}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE' + url: + (rootUrl + + '/v1/projects/{projectId}/regions/{region}/clusters/{clusterName}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' }, options), params, - requiredParams: ['projectId', 'region', 'jobId'], - pathParams: ['jobId', 'projectId', 'region'], + requiredParams: ['projectId', 'region', 'clusterName'], + pathParams: ['clusterName', 'projectId', 'region'], context: this.getRoot() }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * dataproc.projects.regions.jobs.get - * @desc Gets the resource representation for a job in a project. - * @example - * * // BEFORE RUNNING: - * // --------------- - * // 1. If not already done, enable the Google Cloud Dataproc API - * // and check the quota for your project at - * // https://console.developers.google.com/apis/api/dataproc - * // 2. This sample uses Application Default Credentials for - * authentication. - * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk and run - * // `gcloud beta auth application-default login`. - * // For more information, see - * // - * https://developers.google.com/identity/protocols/application-default-credentials - * // 3. Install the Node.js client library by running - * // `npm install googleapis --save` - * - * var google = require('googleapis'); - * var dataproc = google.dataproc('v1'); - * - * authorize(function(authClient) { - * var request = { - * // Required. The ID of the Google Cloud Platform project that the job - * belongs to. projectId: 'my-project-id', // TODO: Update placeholder - * value. - * - * // Required. The Cloud Dataproc region in which to handle the - * request. region: 'my-region', // TODO: Update placeholder value. - * - * // Required. The job ID. - * jobId: 'my-job-id', // TODO: Update placeholder value. - * - * auth: authClient, - * }; - * - * dataproc.projects.regions.jobs.get(request, function(err, response) { - * if (err) { - * console.error(err); - * return; - * } - * - * // TODO: Change code below to process the `response` object: - * console.log(JSON.stringify(response, null, 2)); - * }); - * }); - * - * function authorize(callback) { - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.error('authentication failed: ', err); - * return; - * } - * if (authClient.createScopedRequired && - * authClient.createScopedRequired()) { var scopes = - * ['https://www.googleapis.com/auth/cloud-platform']; authClient = - * authClient.createScoped(scopes); - * } - * callback(authClient); - * }); - * } - * @alias dataproc.projects.regions.jobs.get + * dataproc.projects.regions.clusters.setIamPolicy + * @desc Sets the access control policy on the specified resource. Replaces + * any existing policy. + * @alias dataproc.projects.regions.clusters.setIamPolicy * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.jobId Required. The job ID. - * @param {string} params.projectId Required. The ID of the Google Cloud Platform project that the job belongs to. - * @param {string} params.region Required. The Cloud Dataproc region in which to handle the request. + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * @param {().SetIamPolicyRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - get(params?: Params$Resource$Projects$Regions$Jobs$Get, - options?: MethodOptions): AxiosPromise; - get(params: Params$Resource$Projects$Regions$Jobs$Get, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - get(params: Params$Resource$Projects$Regions$Jobs$Get, - callback: BodyResponseCallback): void; - get(callback: BodyResponseCallback): void; - get(paramsOrCallback?: Params$Resource$Projects$Regions$Jobs$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Projects$Regions$Jobs$Get; + setIamPolicy( + params?: Params$Resource$Projects$Regions$Clusters$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Regions$Clusters$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Projects$Regions$Clusters$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + Params$Resource$Projects$Regions$Clusters$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Regions$Clusters$Setiampolicy; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Jobs$Get; + params = {} as Params$Resource$Projects$Regions$Clusters$Setiampolicy; options = {}; } @@ -3409,63 +3614,74 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + - '/v1/projects/{projectId}/regions/{region}/jobs/{jobId}') + url: (rootUrl + '/v1/{+resource}:setIamPolicy') .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' + method: 'POST' }, options), params, - requiredParams: ['projectId', 'region', 'jobId'], - pathParams: ['jobId', 'projectId', 'region'], + requiredParams: ['resource'], + pathParams: ['resource'], context: this.getRoot() }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * dataproc.projects.regions.jobs.getIamPolicy - * @desc Gets the access control policy for a resource. Returns an empty - * policy if the resource exists and does not have a policy set. - * @alias dataproc.projects.regions.jobs.getIamPolicy + * dataproc.projects.regions.clusters.testIamPermissions + * @desc Returns permissions that a caller has on the specified resource. If + * the resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error.Note: This operation is designed to be + * used for building permission-aware UIs and command-line tools, not for + * authorization checking. This operation may "fail open" without warning. + * @alias dataproc.projects.regions.clusters.testIamPermissions * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. - * @param {().GetIamPolicyRequest} params.resource Request body data + * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * @param {().TestIamPermissionsRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - getIamPolicy( - params?: Params$Resource$Projects$Regions$Jobs$Getiampolicy, - options?: MethodOptions): AxiosPromise; - getIamPolicy( - params: Params$Resource$Projects$Regions$Jobs$Getiampolicy, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - getIamPolicy( - params: Params$Resource$Projects$Regions$Jobs$Getiampolicy, - callback: BodyResponseCallback): void; - getIamPolicy(callback: BodyResponseCallback): void; - getIamPolicy( - paramsOrCallback?: Params$Resource$Projects$Regions$Jobs$Getiampolicy| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + testIamPermissions( + params?: Params$Resource$Projects$Regions$Clusters$Testiampermissions, + options?: MethodOptions): + AxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Regions$Clusters$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + testIamPermissions( + params: Params$Resource$Projects$Regions$Clusters$Testiampermissions, + callback: BodyResponseCallback): + void; + testIamPermissions( + callback: BodyResponseCallback): + void; + testIamPermissions( + paramsOrCallback?: + Params$Resource$Projects$Regions$Clusters$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Jobs$Getiampolicy; + Params$Resource$Projects$Regions$Clusters$Testiampermissions; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Jobs$Getiampolicy; + params = {} as + Params$Resource$Projects$Regions$Clusters$Testiampermissions; options = {}; } @@ -3478,7 +3694,7 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1/{+resource}:getIamPolicy') + url: (rootUrl + '/v1/{+resource}:testIamPermissions') .replace(/([^:]\/)\/+/g, '$1'), method: 'POST' }, @@ -3489,160 +3705,304 @@ export namespace dataproc_v1 { context: this.getRoot() }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest( + parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } + } - + export interface Params$Resource$Projects$Regions$Clusters$Create { /** - * dataproc.projects.regions.jobs.list - * @desc Lists regions/{region}/jobs in a project. - * @example - * * // BEFORE RUNNING: - * // --------------- - * // 1. If not already done, enable the Google Cloud Dataproc API - * // and check the quota for your project at - * // https://console.developers.google.com/apis/api/dataproc - * // 2. This sample uses Application Default Credentials for - * authentication. - * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk and run - * // `gcloud beta auth application-default login`. - * // For more information, see - * // - * https://developers.google.com/identity/protocols/application-default-credentials - * // 3. Install the Node.js client library by running - * // `npm install googleapis --save` - * - * var google = require('googleapis'); - * var dataproc = google.dataproc('v1'); - * - * authorize(function(authClient) { - * var request = { - * // Required. The ID of the Google Cloud Platform project that the job - * belongs to. projectId: 'my-project-id', // TODO: Update placeholder - * value. - * - * // Required. The Cloud Dataproc region in which to handle the - * request. region: 'my-region', // TODO: Update placeholder value. - * - * auth: authClient, - * }; - * - * var handlePage = function(err, response) { - * if (err) { - * console.error(err); - * return; - * } - * - * var jobsPage = response['jobs']; - * if (!jobsPage) { - * return; - * } - * for (var i = 0; i < jobsPage.length; i++) { - * // TODO: Change code below to process each resource in `jobsPage`: - * console.log(JSON.stringify(jobsPage[i], null, 2)); - * } - * - * if (response.nextPageToken) { - * request.pageToken = response.nextPageToken; - * dataproc.projects.regions.jobs.list(request, handlePage); - * } - * }; - * - * dataproc.projects.regions.jobs.list(request, handlePage); - * }); - * - * function authorize(callback) { - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.error('authentication failed: ', err); - * return; - * } - * if (authClient.createScopedRequired && - * authClient.createScopedRequired()) { var scopes = - * ['https://www.googleapis.com/auth/cloud-platform']; authClient = - * authClient.createScoped(scopes); - * } - * callback(authClient); - * }); - * } - * @alias dataproc.projects.regions.jobs.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string=} params.clusterName Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster. - * @param {string=} params.filter Optional. A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is status.state or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be either ACTIVE or NON_ACTIVE. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND labels.env = staging AND labels.starred = * - * @param {string=} params.jobStateMatcher Optional. Specifies enumerated categories of jobs to list. (default = match ALL jobs).If filter is provided, jobStateMatcher will be ignored. - * @param {integer=} params.pageSize Optional. The number of results to return in each response. - * @param {string=} params.pageToken Optional. The page token, returned by a previous call, to request the next page of results. - * @param {string} params.projectId Required. The ID of the Google Cloud Platform project that the job belongs to. - * @param {string} params.region Required. The Cloud Dataproc region in which to handle the request. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object + * Auth client or API Key for the request */ - list( - params?: Params$Resource$Projects$Regions$Jobs$List, - options?: MethodOptions): AxiosPromise; - list( - params: Params$Resource$Projects$Regions$Jobs$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Projects$Regions$Jobs$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Projects$Regions$Jobs$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Jobs$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Jobs$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - const rootUrl = options.rootUrl || 'https://dataproc.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v1/projects/{projectId}/regions/{region}/jobs') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['projectId', 'region'], - pathParams: ['projectId', 'region'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } + /** + * Required. The ID of the Google Cloud Platform project that the cluster + * belongs to. + */ + projectId?: string; + /** + * Required. The Cloud Dataproc region in which to handle the request. + */ + region?: string; + /** + * Optional. A unique id used to identify the request. If the server + * receives two CreateClusterRequest requests with the same id, then the + * second request will be ignored and the first google.longrunning.Operation + * created and stored in the backend is returned.It is recommended to always + * set this value to a UUID + * (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must + * contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and + * hyphens (-). The maximum length is 40 characters. + */ + requestId?: string; + /** + * Request body metadata + */ + requestBody?: Schema$Cluster; + } + export interface Params$Resource$Projects$Regions$Clusters$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * dataproc.projects.regions.jobs.patch - * @desc Updates a job in a project. - * @example + * Required. The cluster name. + */ + clusterName?: string; + /** + * Optional. Specifying the cluster_uuid means the RPC should fail (with + * error NOT_FOUND) if cluster with specified UUID does not exist. + */ + clusterUuid?: string; + /** + * Required. The ID of the Google Cloud Platform project that the cluster + * belongs to. + */ + projectId?: string; + /** + * Required. The Cloud Dataproc region in which to handle the request. + */ + region?: string; + /** + * Optional. A unique id used to identify the request. If the server + * receives two DeleteClusterRequest requests with the same id, then the + * second request will be ignored and the first google.longrunning.Operation + * created and stored in the backend is returned.It is recommended to always + * set this value to a UUID + * (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must + * contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and + * hyphens (-). The maximum length is 40 characters. + */ + requestId?: string; + } + export interface Params$Resource$Projects$Regions$Clusters$Diagnose { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The cluster name. + */ + clusterName?: string; + /** + * Required. The ID of the Google Cloud Platform project that the cluster + * belongs to. + */ + projectId?: string; + /** + * Required. The Cloud Dataproc region in which to handle the request. + */ + region?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$DiagnoseClusterRequest; + } + export interface Params$Resource$Projects$Regions$Clusters$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The cluster name. + */ + clusterName?: string; + /** + * Required. The ID of the Google Cloud Platform project that the cluster + * belongs to. + */ + projectId?: string; + /** + * Required. The Cloud Dataproc region in which to handle the request. + */ + region?: string; + } + export interface Params$Resource$Projects$Regions$Clusters$Getiampolicy { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy is being requested. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GetIamPolicyRequest; + } + export interface Params$Resource$Projects$Regions$Clusters$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Optional. A filter constraining the clusters to list. Filters are + * case-sensitive and have the following syntax:field = value AND field = + * value ...where field is one of status.state, clusterName, or + * labels.[KEY], and [KEY] is a label key. value can be * to match all + * values. status.state can be one of the following: ACTIVE, INACTIVE, + * CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the + * CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING + * and ERROR states. clusterName is the name of the cluster provided at + * creation time. Only the logical AND operator is supported; + * space-separated items are treated as having an implicit AND + * operator.Example filter:status.state = ACTIVE AND clusterName = mycluster + * AND labels.env = staging AND labels.starred = * + */ + filter?: string; + /** + * Optional. The standard List page size. + */ + pageSize?: number; + /** + * Optional. The standard List page token. + */ + pageToken?: string; + /** + * Required. The ID of the Google Cloud Platform project that the cluster + * belongs to. + */ + projectId?: string; + /** + * Required. The Cloud Dataproc region in which to handle the request. + */ + region?: string; + } + export interface Params$Resource$Projects$Regions$Clusters$Patch { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The cluster name. + */ + clusterName?: string; + /** + * Optional. Timeout for graceful YARN decomissioning. Graceful + * decommissioning allows removing nodes from the cluster without + * interrupting jobs in progress. Timeout specifies how long to wait for + * jobs in progress to finish before forcefully removing nodes (and + * potentially interrupting jobs). Default timeout is 0 (for forceful + * decommission), and the maximum allowed timeout is 1 day.Only supported on + * Dataproc image versions 1.2 and higher. + */ + gracefulDecommissionTimeout?: string; + /** + * Required. The ID of the Google Cloud Platform project the cluster belongs + * to. + */ + projectId?: string; + /** + * Required. The Cloud Dataproc region in which to handle the request. + */ + region?: string; + /** + * Optional. A unique id used to identify the request. If the server + * receives two UpdateClusterRequest requests with the same id, then the + * second request will be ignored and the first google.longrunning.Operation + * created and stored in the backend is returned.It is recommended to always + * set this value to a UUID + * (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must + * contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and + * hyphens (-). The maximum length is 40 characters. + */ + requestId?: string; + /** + * Required. Specifies the path, relative to Cluster, of the field to + * update. For example, to change the number of workers in a cluster to 5, + * the update_mask parameter would be specified as + * config.worker_config.num_instances, and the PATCH request body would + * specify the new value, as follows: { "config":{ "workerConfig":{ + * "numInstances":"5" } } } Similarly, to change the number of + * preemptible workers in a cluster to 5, the update_mask parameter would be + * config.secondary_worker_config.num_instances, and the PATCH request body + * would be set as follows: { "config":{ "secondaryWorkerConfig":{ + * "numInstances":"5" } } } Note: Currently, only the + * following fields can be updated: + * + * + * + * + * + * + *
Mask Purpose
labels Update labels
config.worker_config.num_instancesResize primary worker group
config.secondary_worker_config.num_instancesResize secondary worker group
+ */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Cluster; + } + export interface Params$Resource$Projects$Regions$Clusters$Setiampolicy { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy is being specified. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Regions$Clusters$Testiampermissions { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + + + export class Resource$Projects$Regions$Jobs { + root: Dataproc; + constructor(root: Dataproc) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * dataproc.projects.regions.jobs.cancel + * @desc Starts a job cancellation request. To access the job resource after + * cancellation, call regions/{region}/jobs.list or + * regions/{region}/jobs.get. + * @example * * // BEFORE RUNNING: * // --------------- * // 1. If not already done, enable the Google Cloud Dataproc API @@ -3675,18 +4035,14 @@ export namespace dataproc_v1 { * jobId: 'my-job-id', // TODO: Update placeholder value. * * resource: { - * // TODO: Add desired properties to the request body. Only these - * properties - * // will be changed. + * // TODO: Add desired properties to the request body. * }, * * auth: authClient, * }; * - * dataproc.projects.regions.jobs.patch(request, function(err, response) { - * if (err) { - * console.error(err); - * return; + * dataproc.projects.regions.jobs.cancel(request, function(err, response) + * { if (err) { console.error(err); return; * } * * // TODO: Change code below to process the `response` object: @@ -3708,43 +4064,42 @@ export namespace dataproc_v1 { * callback(authClient); * }); * } - * @alias dataproc.projects.regions.jobs.patch + * @alias dataproc.projects.regions.jobs.cancel * @memberOf! () * * @param {object} params Parameters for request * @param {string} params.jobId Required. The job ID. * @param {string} params.projectId Required. The ID of the Google Cloud Platform project that the job belongs to. * @param {string} params.region Required. The Cloud Dataproc region in which to handle the request. - * @param {string=} params.updateMask Required. Specifies the path, relative to Job, of the field to update. For example, to update the labels of a Job the update_mask parameter would be specified as labels, and the PATCH request body would specify the new value. Note: Currently, labels is the only field that can be updated. - * @param {().Job} params.resource Request body data + * @param {().CancelJobRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - patch( - params?: Params$Resource$Projects$Regions$Jobs$Patch, + cancel( + params?: Params$Resource$Projects$Regions$Jobs$Cancel, options?: MethodOptions): AxiosPromise; - patch( - params: Params$Resource$Projects$Regions$Jobs$Patch, + cancel( + params: Params$Resource$Projects$Regions$Jobs$Cancel, options: MethodOptions|BodyResponseCallback, callback: BodyResponseCallback): void; - patch( - params: Params$Resource$Projects$Regions$Jobs$Patch, + cancel( + params: Params$Resource$Projects$Regions$Jobs$Cancel, callback: BodyResponseCallback): void; - patch(callback: BodyResponseCallback): void; - patch( - paramsOrCallback?: Params$Resource$Projects$Regions$Jobs$Patch| + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: Params$Resource$Projects$Regions$Jobs$Cancel| BodyResponseCallback, optionsOrCallback?: MethodOptions|BodyResponseCallback, callback?: BodyResponseCallback): void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Jobs$Patch; + Params$Resource$Projects$Regions$Jobs$Cancel; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Jobs$Patch; + params = {} as Params$Resource$Projects$Regions$Jobs$Cancel; options = {}; } @@ -3757,10 +4112,11 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + - '/v1/projects/{projectId}/regions/{region}/jobs/{jobId}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH' + url: + (rootUrl + + '/v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' }, options), params, @@ -3777,43 +4133,101 @@ export namespace dataproc_v1 { /** - * dataproc.projects.regions.jobs.setIamPolicy - * @desc Sets the access control policy on the specified resource. Replaces - * any existing policy. - * @alias dataproc.projects.regions.jobs.setIamPolicy + * dataproc.projects.regions.jobs.delete + * @desc Deletes the job from the project. If the job is active, the delete + * fails, and the response returns FAILED_PRECONDITION. + * @example + * * // BEFORE RUNNING: + * // --------------- + * // 1. If not already done, enable the Google Cloud Dataproc API + * // and check the quota for your project at + * // https://console.developers.google.com/apis/api/dataproc + * // 2. This sample uses Application Default Credentials for + * authentication. + * // If not already done, install the gcloud CLI from + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login`. + * // For more information, see + * // + * https://developers.google.com/identity/protocols/application-default-credentials + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * + * var google = require('googleapis'); + * var dataproc = google.dataproc('v1'); + * + * authorize(function(authClient) { + * var request = { + * // Required. The ID of the Google Cloud Platform project that the job + * belongs to. projectId: 'my-project-id', // TODO: Update placeholder + * value. + * + * // Required. The Cloud Dataproc region in which to handle the + * request. region: 'my-region', // TODO: Update placeholder value. + * + * // Required. The job ID. + * jobId: 'my-job-id', // TODO: Update placeholder value. + * + * auth: authClient, + * }; + * + * dataproc.projects.regions.jobs.delete(request, function(err) { + * if (err) { + * console.error(err); + * return; + * } + * }); + * }); + * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient) { + * if (err) { + * console.error('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && + * authClient.createScopedRequired()) { var scopes = + * ['https://www.googleapis.com/auth/cloud-platform']; authClient = + * authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * @alias dataproc.projects.regions.jobs.delete * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. - * @param {().SetIamPolicyRequest} params.resource Request body data + * @param {string} params.jobId Required. The job ID. + * @param {string} params.projectId Required. The ID of the Google Cloud Platform project that the job belongs to. + * @param {string} params.region Required. The Cloud Dataproc region in which to handle the request. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - setIamPolicy( - params?: Params$Resource$Projects$Regions$Jobs$Setiampolicy, - options?: MethodOptions): AxiosPromise; - setIamPolicy( - params: Params$Resource$Projects$Regions$Jobs$Setiampolicy, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - setIamPolicy( - params: Params$Resource$Projects$Regions$Jobs$Setiampolicy, - callback: BodyResponseCallback): void; - setIamPolicy(callback: BodyResponseCallback): void; - setIamPolicy( - paramsOrCallback?: Params$Resource$Projects$Regions$Jobs$Setiampolicy| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + delete( + params?: Params$Resource$Projects$Regions$Jobs$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Projects$Regions$Jobs$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Projects$Regions$Jobs$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Projects$Regions$Jobs$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Jobs$Setiampolicy; + Params$Resource$Projects$Regions$Jobs$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Jobs$Setiampolicy; + params = {} as Params$Resource$Projects$Regions$Jobs$Delete; options = {}; } @@ -3826,27 +4240,28 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1/{+resource}:setIamPolicy') + url: (rootUrl + + '/v1/projects/{projectId}/regions/{region}/jobs/{jobId}') .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' + method: 'DELETE' }, options), params, - requiredParams: ['resource'], - pathParams: ['resource'], + requiredParams: ['projectId', 'region', 'jobId'], + pathParams: ['jobId', 'projectId', 'region'], context: this.getRoot() }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * dataproc.projects.regions.jobs.submit - * @desc Submits a job to a cluster. + * dataproc.projects.regions.jobs.get + * @desc Gets the resource representation for a job in a project. * @example * * // BEFORE RUNNING: * // --------------- @@ -3876,15 +4291,16 @@ export namespace dataproc_v1 { * // Required. The Cloud Dataproc region in which to handle the * request. region: 'my-region', // TODO: Update placeholder value. * - * resource: { - * // TODO: Add desired properties to the request body. - * }, + * // Required. The job ID. + * jobId: 'my-job-id', // TODO: Update placeholder value. * * auth: authClient, * }; * - * dataproc.projects.regions.jobs.submit(request, function(err, response) - * { if (err) { console.error(err); return; + * dataproc.projects.regions.jobs.get(request, function(err, response) { + * if (err) { + * console.error(err); + * return; * } * * // TODO: Change code below to process the `response` object: @@ -3906,41 +4322,37 @@ export namespace dataproc_v1 { * callback(authClient); * }); * } - * @alias dataproc.projects.regions.jobs.submit + * @alias dataproc.projects.regions.jobs.get * @memberOf! () * * @param {object} params Parameters for request + * @param {string} params.jobId Required. The job ID. * @param {string} params.projectId Required. The ID of the Google Cloud Platform project that the job belongs to. * @param {string} params.region Required. The Cloud Dataproc region in which to handle the request. - * @param {().SubmitJobRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - submit( - params?: Params$Resource$Projects$Regions$Jobs$Submit, + get(params?: Params$Resource$Projects$Regions$Jobs$Get, options?: MethodOptions): AxiosPromise; - submit( - params: Params$Resource$Projects$Regions$Jobs$Submit, + get(params: Params$Resource$Projects$Regions$Jobs$Get, options: MethodOptions|BodyResponseCallback, callback: BodyResponseCallback): void; - submit( - params: Params$Resource$Projects$Regions$Jobs$Submit, + get(params: Params$Resource$Projects$Regions$Jobs$Get, callback: BodyResponseCallback): void; - submit(callback: BodyResponseCallback): void; - submit( - paramsOrCallback?: Params$Resource$Projects$Regions$Jobs$Submit| + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Projects$Regions$Jobs$Get| BodyResponseCallback, optionsOrCallback?: MethodOptions|BodyResponseCallback, callback?: BodyResponseCallback): void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Jobs$Submit; + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Regions$Jobs$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Jobs$Submit; + params = {} as Params$Resource$Projects$Regions$Jobs$Get; options = {}; } @@ -3954,14 +4366,14 @@ export namespace dataproc_v1 { options: Object.assign( { url: (rootUrl + - '/v1/projects/{projectId}/regions/{region}/jobs:submit') + '/v1/projects/{projectId}/regions/{region}/jobs/{jobId}') .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' + method: 'GET' }, options), params, - requiredParams: ['projectId', 'region'], - pathParams: ['projectId', 'region'], + requiredParams: ['projectId', 'region', 'jobId'], + pathParams: ['jobId', 'projectId', 'region'], context: this.getRoot() }; if (callback) { @@ -3973,54 +4385,43 @@ export namespace dataproc_v1 { /** - * dataproc.projects.regions.jobs.testIamPermissions - * @desc Returns permissions that a caller has on the specified resource. If - * the resource does not exist, this will return an empty set of - * permissions, not a NOT_FOUND error.Note: This operation is designed to be - * used for building permission-aware UIs and command-line tools, not for - * authorization checking. This operation may "fail open" without warning. - * @alias dataproc.projects.regions.jobs.testIamPermissions + * dataproc.projects.regions.jobs.getIamPolicy + * @desc Gets the access control policy for a resource. Returns an empty + * policy if the resource exists and does not have a policy set. + * @alias dataproc.projects.regions.jobs.getIamPolicy * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. - * @param {().TestIamPermissionsRequest} params.resource Request body data + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + * @param {().GetIamPolicyRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - testIamPermissions( - params?: Params$Resource$Projects$Regions$Jobs$Testiampermissions, - options?: MethodOptions): - AxiosPromise; - testIamPermissions( - params: Params$Resource$Projects$Regions$Jobs$Testiampermissions, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): - void; - testIamPermissions( - params: Params$Resource$Projects$Regions$Jobs$Testiampermissions, - callback: BodyResponseCallback): - void; - testIamPermissions( - callback: BodyResponseCallback): - void; - testIamPermissions( - paramsOrCallback?: - Params$Resource$Projects$Regions$Jobs$Testiampermissions| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Jobs$Testiampermissions; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Jobs$Testiampermissions; + getIamPolicy( + params?: Params$Resource$Projects$Regions$Jobs$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Regions$Jobs$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Projects$Regions$Jobs$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: Params$Resource$Projects$Regions$Jobs$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Regions$Jobs$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Regions$Jobs$Getiampolicy; options = {}; } @@ -4033,7 +4434,7 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1/{+resource}:testIamPermissions') + url: (rootUrl + '/v1/{+resource}:getIamPolicy') .replace(/([^:]\/)\/+/g, '$1'), method: 'POST' }, @@ -4044,111 +4445,666 @@ export namespace dataproc_v1 { context: this.getRoot() }; if (callback) { - createAPIRequest( - parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } - } - export interface Params$Resource$Projects$Regions$Jobs$Cancel { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Required. The job ID. - */ - jobId?: string; - /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - */ - projectId?: string; - /** - * Required. The Cloud Dataproc region in which to handle the request. - */ - region?: string; /** - * Request body metadata - */ - requestBody?: Schema$CancelJobRequest; - } - export interface Params$Resource$Projects$Regions$Jobs$Delete { - /** - * Auth client or API Key for the request + * dataproc.projects.regions.jobs.list + * @desc Lists regions/{region}/jobs in a project. + * @example + * * // BEFORE RUNNING: + * // --------------- + * // 1. If not already done, enable the Google Cloud Dataproc API + * // and check the quota for your project at + * // https://console.developers.google.com/apis/api/dataproc + * // 2. This sample uses Application Default Credentials for + * authentication. + * // If not already done, install the gcloud CLI from + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login`. + * // For more information, see + * // + * https://developers.google.com/identity/protocols/application-default-credentials + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * + * var google = require('googleapis'); + * var dataproc = google.dataproc('v1'); + * + * authorize(function(authClient) { + * var request = { + * // Required. The ID of the Google Cloud Platform project that the job + * belongs to. projectId: 'my-project-id', // TODO: Update placeholder + * value. + * + * // Required. The Cloud Dataproc region in which to handle the + * request. region: 'my-region', // TODO: Update placeholder value. + * + * auth: authClient, + * }; + * + * var handlePage = function(err, response) { + * if (err) { + * console.error(err); + * return; + * } + * + * var jobsPage = response['jobs']; + * if (!jobsPage) { + * return; + * } + * for (var i = 0; i < jobsPage.length; i++) { + * // TODO: Change code below to process each resource in `jobsPage`: + * console.log(JSON.stringify(jobsPage[i], null, 2)); + * } + * + * if (response.nextPageToken) { + * request.pageToken = response.nextPageToken; + * dataproc.projects.regions.jobs.list(request, handlePage); + * } + * }; + * + * dataproc.projects.regions.jobs.list(request, handlePage); + * }); + * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient) { + * if (err) { + * console.error('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && + * authClient.createScopedRequired()) { var scopes = + * ['https://www.googleapis.com/auth/cloud-platform']; authClient = + * authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * @alias dataproc.projects.regions.jobs.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.clusterName Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster. + * @param {string=} params.filter Optional. A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is status.state or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be either ACTIVE or NON_ACTIVE. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND labels.env = staging AND labels.starred = * + * @param {string=} params.jobStateMatcher Optional. Specifies enumerated categories of jobs to list. (default = match ALL jobs).If filter is provided, jobStateMatcher will be ignored. + * @param {integer=} params.pageSize Optional. The number of results to return in each response. + * @param {string=} params.pageToken Optional. The page token, returned by a previous call, to request the next page of results. + * @param {string} params.projectId Required. The ID of the Google Cloud Platform project that the job belongs to. + * @param {string} params.region Required. The Cloud Dataproc region in which to handle the request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + list( + params?: Params$Resource$Projects$Regions$Jobs$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Projects$Regions$Jobs$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Projects$Regions$Jobs$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Projects$Regions$Jobs$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Regions$Jobs$List; + let options = (optionsOrCallback || {}) as MethodOptions; - /** - * Required. The job ID. - */ - jobId?: string; - /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - */ - projectId?: string; - /** - * Required. The Cloud Dataproc region in which to handle the request. - */ - region?: string; - } - export interface Params$Resource$Projects$Regions$Jobs$Get { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Regions$Jobs$List; + options = {}; + } - /** - * Required. The job ID. - */ - jobId?: string; - /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - */ - projectId?: string; - /** - * Required. The Cloud Dataproc region in which to handle the request. - */ - region?: string; - } - export interface Params$Resource$Projects$Regions$Jobs$Getiampolicy { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } - /** - * REQUIRED: The resource for which the policy is being requested. See the - * operation documentation for the appropriate value for this field. - */ - resource?: string; + const rootUrl = options.rootUrl || 'https://dataproc.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/projects/{projectId}/regions/{region}/jobs') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['projectId', 'region'], + pathParams: ['projectId', 'region'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } - /** - * Request body metadata - */ - requestBody?: Schema$GetIamPolicyRequest; - } - export interface Params$Resource$Projects$Regions$Jobs$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Optional. If set, the returned jobs list includes only jobs that were - * submitted to the named cluster. - */ - clusterName?: string; - /** - * Optional. A filter constraining the jobs to list. Filters are - * case-sensitive and have the following syntax:field = value AND field = - * value ...where field is status.state or labels.[KEY], and [KEY] is a + * dataproc.projects.regions.jobs.patch + * @desc Updates a job in a project. + * @example + * * // BEFORE RUNNING: + * // --------------- + * // 1. If not already done, enable the Google Cloud Dataproc API + * // and check the quota for your project at + * // https://console.developers.google.com/apis/api/dataproc + * // 2. This sample uses Application Default Credentials for + * authentication. + * // If not already done, install the gcloud CLI from + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login`. + * // For more information, see + * // + * https://developers.google.com/identity/protocols/application-default-credentials + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * + * var google = require('googleapis'); + * var dataproc = google.dataproc('v1'); + * + * authorize(function(authClient) { + * var request = { + * // Required. The ID of the Google Cloud Platform project that the job + * belongs to. projectId: 'my-project-id', // TODO: Update placeholder + * value. + * + * // Required. The Cloud Dataproc region in which to handle the + * request. region: 'my-region', // TODO: Update placeholder value. + * + * // Required. The job ID. + * jobId: 'my-job-id', // TODO: Update placeholder value. + * + * resource: { + * // TODO: Add desired properties to the request body. Only these + * properties + * // will be changed. + * }, + * + * auth: authClient, + * }; + * + * dataproc.projects.regions.jobs.patch(request, function(err, response) { + * if (err) { + * console.error(err); + * return; + * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); + * }); + * }); + * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient) { + * if (err) { + * console.error('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && + * authClient.createScopedRequired()) { var scopes = + * ['https://www.googleapis.com/auth/cloud-platform']; authClient = + * authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * @alias dataproc.projects.regions.jobs.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.jobId Required. The job ID. + * @param {string} params.projectId Required. The ID of the Google Cloud Platform project that the job belongs to. + * @param {string} params.region Required. The Cloud Dataproc region in which to handle the request. + * @param {string=} params.updateMask Required. Specifies the path, relative to Job, of the field to update. For example, to update the labels of a Job the update_mask parameter would be specified as labels, and the PATCH request body would specify the new value. Note: Currently, labels is the only field that can be updated. + * @param {().Job} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Projects$Regions$Jobs$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Projects$Regions$Jobs$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Projects$Regions$Jobs$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Projects$Regions$Jobs$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Regions$Jobs$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Regions$Jobs$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dataproc.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + + '/v1/projects/{projectId}/regions/{region}/jobs/{jobId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['projectId', 'region', 'jobId'], + pathParams: ['jobId', 'projectId', 'region'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * dataproc.projects.regions.jobs.setIamPolicy + * @desc Sets the access control policy on the specified resource. Replaces + * any existing policy. + * @alias dataproc.projects.regions.jobs.setIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * @param {().SetIamPolicyRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + setIamPolicy( + params?: Params$Resource$Projects$Regions$Jobs$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Regions$Jobs$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Projects$Regions$Jobs$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: Params$Resource$Projects$Regions$Jobs$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Regions$Jobs$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Regions$Jobs$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dataproc.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * dataproc.projects.regions.jobs.submit + * @desc Submits a job to a cluster. + * @example + * * // BEFORE RUNNING: + * // --------------- + * // 1. If not already done, enable the Google Cloud Dataproc API + * // and check the quota for your project at + * // https://console.developers.google.com/apis/api/dataproc + * // 2. This sample uses Application Default Credentials for + * authentication. + * // If not already done, install the gcloud CLI from + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login`. + * // For more information, see + * // + * https://developers.google.com/identity/protocols/application-default-credentials + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * + * var google = require('googleapis'); + * var dataproc = google.dataproc('v1'); + * + * authorize(function(authClient) { + * var request = { + * // Required. The ID of the Google Cloud Platform project that the job + * belongs to. projectId: 'my-project-id', // TODO: Update placeholder + * value. + * + * // Required. The Cloud Dataproc region in which to handle the + * request. region: 'my-region', // TODO: Update placeholder value. + * + * resource: { + * // TODO: Add desired properties to the request body. + * }, + * + * auth: authClient, + * }; + * + * dataproc.projects.regions.jobs.submit(request, function(err, response) + * { if (err) { console.error(err); return; + * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); + * }); + * }); + * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient) { + * if (err) { + * console.error('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && + * authClient.createScopedRequired()) { var scopes = + * ['https://www.googleapis.com/auth/cloud-platform']; authClient = + * authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * @alias dataproc.projects.regions.jobs.submit + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.projectId Required. The ID of the Google Cloud Platform project that the job belongs to. + * @param {string} params.region Required. The Cloud Dataproc region in which to handle the request. + * @param {().SubmitJobRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + submit( + params?: Params$Resource$Projects$Regions$Jobs$Submit, + options?: MethodOptions): AxiosPromise; + submit( + params: Params$Resource$Projects$Regions$Jobs$Submit, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + submit( + params: Params$Resource$Projects$Regions$Jobs$Submit, + callback: BodyResponseCallback): void; + submit(callback: BodyResponseCallback): void; + submit( + paramsOrCallback?: Params$Resource$Projects$Regions$Jobs$Submit| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Regions$Jobs$Submit; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Regions$Jobs$Submit; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dataproc.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + + '/v1/projects/{projectId}/regions/{region}/jobs:submit') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['projectId', 'region'], + pathParams: ['projectId', 'region'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * dataproc.projects.regions.jobs.testIamPermissions + * @desc Returns permissions that a caller has on the specified resource. If + * the resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error.Note: This operation is designed to be + * used for building permission-aware UIs and command-line tools, not for + * authorization checking. This operation may "fail open" without warning. + * @alias dataproc.projects.regions.jobs.testIamPermissions + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * @param {().TestIamPermissionsRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + testIamPermissions( + params?: Params$Resource$Projects$Regions$Jobs$Testiampermissions, + options?: MethodOptions): + AxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Regions$Jobs$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + testIamPermissions( + params: Params$Resource$Projects$Regions$Jobs$Testiampermissions, + callback: BodyResponseCallback): + void; + testIamPermissions( + callback: BodyResponseCallback): + void; + testIamPermissions( + paramsOrCallback?: + Params$Resource$Projects$Regions$Jobs$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Regions$Jobs$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Regions$Jobs$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dataproc.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Regions$Jobs$Cancel { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The job ID. + */ + jobId?: string; + /** + * Required. The ID of the Google Cloud Platform project that the job + * belongs to. + */ + projectId?: string; + /** + * Required. The Cloud Dataproc region in which to handle the request. + */ + region?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CancelJobRequest; + } + export interface Params$Resource$Projects$Regions$Jobs$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The job ID. + */ + jobId?: string; + /** + * Required. The ID of the Google Cloud Platform project that the job + * belongs to. + */ + projectId?: string; + /** + * Required. The Cloud Dataproc region in which to handle the request. + */ + region?: string; + } + export interface Params$Resource$Projects$Regions$Jobs$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The job ID. + */ + jobId?: string; + /** + * Required. The ID of the Google Cloud Platform project that the job + * belongs to. + */ + projectId?: string; + /** + * Required. The Cloud Dataproc region in which to handle the request. + */ + region?: string; + } + export interface Params$Resource$Projects$Regions$Jobs$Getiampolicy { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy is being requested. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GetIamPolicyRequest; + } + export interface Params$Resource$Projects$Regions$Jobs$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Optional. If set, the returned jobs list includes only jobs that were + * submitted to the named cluster. + */ + clusterName?: string; + /** + * Optional. A filter constraining the jobs to list. Filters are + * case-sensitive and have the following syntax:field = value AND field = + * value ...where field is status.state or labels.[KEY], and [KEY] is a * label key. value can be * to match all values. status.state can be either * ACTIVE or NON_ACTIVE. Only the logical AND operator is supported; * space-separated items are treated as having an implicit AND @@ -4186,114 +5142,546 @@ export namespace dataproc_v1 { */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - /** - * Required. The job ID. - */ - jobId?: string; - /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - */ - projectId?: string; - /** - * Required. The Cloud Dataproc region in which to handle the request. - */ - region?: string; - /** - * Required. Specifies the path, relative to Job, of the field - * to update. For example, to update the labels of a Job the - * update_mask parameter would be specified as - * labels, and the PATCH request body would specify the new - * value. Note: Currently, labels is the only - * field that can be updated. - */ - updateMask?: string; + /** + * Required. The job ID. + */ + jobId?: string; + /** + * Required. The ID of the Google Cloud Platform project that the job + * belongs to. + */ + projectId?: string; + /** + * Required. The Cloud Dataproc region in which to handle the request. + */ + region?: string; + /** + * Required. Specifies the path, relative to Job, of the field + * to update. For example, to update the labels of a Job the + * update_mask parameter would be specified as + * labels, and the PATCH request body would specify the new + * value. Note: Currently, labels is the only + * field that can be updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Job; + } + export interface Params$Resource$Projects$Regions$Jobs$Setiampolicy { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy is being specified. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Regions$Jobs$Submit { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The ID of the Google Cloud Platform project that the job + * belongs to. + */ + projectId?: string; + /** + * Required. The Cloud Dataproc region in which to handle the request. + */ + region?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SubmitJobRequest; + } + export interface Params$Resource$Projects$Regions$Jobs$Testiampermissions { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + + + export class Resource$Projects$Regions$Operations { + root: Dataproc; + constructor(root: Dataproc) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * dataproc.projects.regions.operations.cancel + * @desc Starts asynchronous cancellation on a long-running operation. The + * server makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, the + * operation is not deleted; instead, it becomes an operation with an + * Operation.error value with a google.rpc.Status.code of 1, corresponding + * to Code.CANCELLED. + * @example + * * // BEFORE RUNNING: + * // --------------- + * // 1. If not already done, enable the Google Cloud Dataproc API + * // and check the quota for your project at + * // https://console.developers.google.com/apis/api/dataproc + * // 2. This sample uses Application Default Credentials for + * authentication. + * // If not already done, install the gcloud CLI from + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login`. + * // For more information, see + * // + * https://developers.google.com/identity/protocols/application-default-credentials + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * + * var google = require('googleapis'); + * var dataproc = google.dataproc('v1'); + * + * authorize(function(authClient) { + * var request = { + * // The name of the operation resource to be cancelled. + * name: + * 'projects/my-project/regions/my-region/operations/my-operation', // + * TODO: Update placeholder value. + * + * auth: authClient, + * }; + * + * dataproc.projects.regions.operations.cancel(request, function(err) { + * if (err) { + * console.error(err); + * return; + * } + * }); + * }); + * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient) { + * if (err) { + * console.error('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && + * authClient.createScopedRequired()) { var scopes = + * ['https://www.googleapis.com/auth/cloud-platform']; authClient = + * authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * @alias dataproc.projects.regions.operations.cancel + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource to be cancelled. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + cancel( + params?: Params$Resource$Projects$Regions$Operations$Cancel, + options?: MethodOptions): AxiosPromise; + cancel( + params: Params$Resource$Projects$Regions$Operations$Cancel, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + cancel( + params: Params$Resource$Projects$Regions$Operations$Cancel, + callback: BodyResponseCallback): void; + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: Params$Resource$Projects$Regions$Operations$Cancel| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Regions$Operations$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Regions$Operations$Cancel; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dataproc.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:cancel') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + /** - * Request body metadata - */ - requestBody?: Schema$Job; - } - export interface Params$Resource$Projects$Regions$Jobs$Setiampolicy { - /** - * Auth client or API Key for the request + * dataproc.projects.regions.operations.delete + * @desc Deletes a long-running operation. This method indicates that the + * client is no longer interested in the operation result. It does not + * cancel the operation. If the server doesn't support this method, it + * returns google.rpc.Code.UNIMPLEMENTED. + * @example + * * // BEFORE RUNNING: + * // --------------- + * // 1. If not already done, enable the Google Cloud Dataproc API + * // and check the quota for your project at + * // https://console.developers.google.com/apis/api/dataproc + * // 2. This sample uses Application Default Credentials for + * authentication. + * // If not already done, install the gcloud CLI from + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login`. + * // For more information, see + * // + * https://developers.google.com/identity/protocols/application-default-credentials + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * + * var google = require('googleapis'); + * var dataproc = google.dataproc('v1'); + * + * authorize(function(authClient) { + * var request = { + * // The name of the operation resource to be deleted. + * name: + * 'projects/my-project/regions/my-region/operations/my-operation', // + * TODO: Update placeholder value. + * + * auth: authClient, + * }; + * + * dataproc.projects.regions.operations.delete(request, function(err) { + * if (err) { + * console.error(err); + * return; + * } + * }); + * }); + * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient) { + * if (err) { + * console.error('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && + * authClient.createScopedRequired()) { var scopes = + * ['https://www.googleapis.com/auth/cloud-platform']; authClient = + * authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * @alias dataproc.projects.regions.operations.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource to be deleted. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + delete( + params?: Params$Resource$Projects$Regions$Operations$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Projects$Regions$Operations$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Projects$Regions$Operations$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Projects$Regions$Operations$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Regions$Operations$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; - /** - * REQUIRED: The resource for which the policy is being specified. See the - * operation documentation for the appropriate value for this field. - */ - resource?: string; + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Regions$Operations$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dataproc.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } - /** - * Request body metadata - */ - requestBody?: Schema$SetIamPolicyRequest; - } - export interface Params$Resource$Projects$Regions$Jobs$Submit { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Required. The ID of the Google Cloud Platform project that the job - * belongs to. - */ - projectId?: string; - /** - * Required. The Cloud Dataproc region in which to handle the request. + * dataproc.projects.regions.operations.get + * @desc Gets the latest state of a long-running operation. Clients can use + * this method to poll the operation result at intervals as recommended by + * the API service. + * @example + * * // BEFORE RUNNING: + * // --------------- + * // 1. If not already done, enable the Google Cloud Dataproc API + * // and check the quota for your project at + * // https://console.developers.google.com/apis/api/dataproc + * // 2. This sample uses Application Default Credentials for + * authentication. + * // If not already done, install the gcloud CLI from + * // https://cloud.google.com/sdk and run + * // `gcloud beta auth application-default login`. + * // For more information, see + * // + * https://developers.google.com/identity/protocols/application-default-credentials + * // 3. Install the Node.js client library by running + * // `npm install googleapis --save` + * + * var google = require('googleapis'); + * var dataproc = google.dataproc('v1'); + * + * authorize(function(authClient) { + * var request = { + * // The name of the operation resource. + * name: + * 'projects/my-project/regions/my-region/operations/my-operation', // + * TODO: Update placeholder value. + * + * auth: authClient, + * }; + * + * dataproc.projects.regions.operations.get(request, function(err, + * response) { if (err) { console.error(err); return; + * } + * + * // TODO: Change code below to process the `response` object: + * console.log(JSON.stringify(response, null, 2)); + * }); + * }); + * + * function authorize(callback) { + * google.auth.getApplicationDefault(function(err, authClient) { + * if (err) { + * console.error('authentication failed: ', err); + * return; + * } + * if (authClient.createScopedRequired && + * authClient.createScopedRequired()) { var scopes = + * ['https://www.googleapis.com/auth/cloud-platform']; authClient = + * authClient.createScoped(scopes); + * } + * callback(authClient); + * }); + * } + * @alias dataproc.projects.regions.operations.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object */ - region?: string; + get(params?: Params$Resource$Projects$Regions$Operations$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Projects$Regions$Operations$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Projects$Regions$Operations$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Projects$Regions$Operations$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Regions$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Regions$Operations$Get; + options = {}; + } - /** - * Request body metadata - */ - requestBody?: Schema$SubmitJobRequest; - } - export interface Params$Resource$Projects$Regions$Jobs$Testiampermissions { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dataproc.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } - /** - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - */ - resource?: string; /** - * Request body metadata + * dataproc.projects.regions.operations.getIamPolicy + * @desc Gets the access control policy for a resource. Returns an empty + * policy if the resource exists and does not have a policy set. + * @alias dataproc.projects.regions.operations.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + * @param {().GetIamPolicyRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object */ - requestBody?: Schema$TestIamPermissionsRequest; - } + getIamPolicy( + params?: Params$Resource$Projects$Regions$Operations$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Regions$Operations$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Projects$Regions$Operations$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + Params$Resource$Projects$Regions$Operations$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Regions$Operations$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Regions$Operations$Getiampolicy; + options = {}; + } - export class Resource$Projects$Regions$Operations { - root: Dataproc; - constructor(root: Dataproc) { - this.root = root; - this.getRoot.bind(this); - } + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } - getRoot() { - return this.root; + const rootUrl = options.rootUrl || 'https://dataproc.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } } /** - * dataproc.projects.regions.operations.cancel - * @desc Starts asynchronous cancellation on a long-running operation. The - * server makes a best effort to cancel the operation, but success is not - * guaranteed. If the server doesn't support this method, it returns - * google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or - * other methods to check whether the cancellation succeeded or whether the - * operation completed despite cancellation. On successful cancellation, the - * operation is not deleted; instead, it becomes an operation with an - * Operation.error value with a google.rpc.Status.code of 1, corresponding - * to Code.CANCELLED. + * dataproc.projects.regions.operations.list + * @desc Lists operations that match the specified filter in the request. If + * the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: + * the name binding allows API services to override the binding to use + * different resource name schemes, such as users/x/operations. To override + * the binding, API services can add a binding such as + * "/v1/{name=users/x}/operations" to their service configuration. For + * backwards compatibility, the default name includes the operations + * collection id, however overriding users must ensure the name binding is + * the parent resource, without the operations collection id. * @example * * // BEFORE RUNNING: * // --------------- @@ -4316,20 +5704,36 @@ export namespace dataproc_v1 { * * authorize(function(authClient) { * var request = { - * // The name of the operation resource to be cancelled. - * name: - * 'projects/my-project/regions/my-region/operations/my-operation', // - * TODO: Update placeholder value. + * // The name of the operation's parent resource. + * name: 'projects/my-project/regions/my-region/operations', // TODO: + * Update placeholder value. * * auth: authClient, * }; * - * dataproc.projects.regions.operations.cancel(request, function(err) { + * var handlePage = function(err, response) { * if (err) { * console.error(err); * return; * } - * }); + * + * var operationsPage = response['operations']; + * if (!operationsPage) { + * return; + * } + * for (var i = 0; i < operationsPage.length; i++) { + * // TODO: Change code below to process each resource in + * `operationsPage`: console.log(JSON.stringify(operationsPage[i], null, + * 2)); + * } + * + * if (response.nextPageToken) { + * request.pageToken = response.nextPageToken; + * dataproc.projects.regions.operations.list(request, handlePage); + * } + * }; + * + * dataproc.projects.regions.operations.list(request, handlePage); * }); * * function authorize(callback) { @@ -4346,39 +5750,112 @@ export namespace dataproc_v1 { * callback(authClient); * }); * } - * @alias dataproc.projects.regions.operations.cancel + * @alias dataproc.projects.regions.operations.list * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The name of the operation resource to be cancelled. + * @param {string=} params.filter The standard list filter. + * @param {string} params.name The name of the operation's parent resource. + * @param {integer=} params.pageSize The standard list page size. + * @param {string=} params.pageToken The standard list page token. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - cancel( - params?: Params$Resource$Projects$Regions$Operations$Cancel, - options?: MethodOptions): AxiosPromise; - cancel( - params: Params$Resource$Projects$Regions$Operations$Cancel, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - cancel( - params: Params$Resource$Projects$Regions$Operations$Cancel, - callback: BodyResponseCallback): void; - cancel(callback: BodyResponseCallback): void; - cancel( - paramsOrCallback?: Params$Resource$Projects$Regions$Operations$Cancel| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + list( + params?: Params$Resource$Projects$Regions$Operations$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Projects$Regions$Operations$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Projects$Regions$Operations$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Projects$Regions$Operations$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Regions$Operations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Regions$Operations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dataproc.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * dataproc.projects.regions.operations.setIamPolicy + * @desc Sets the access control policy on the specified resource. Replaces + * any existing policy. + * @alias dataproc.projects.regions.operations.setIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * @param {().SetIamPolicyRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + setIamPolicy( + params?: Params$Resource$Projects$Regions$Operations$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Regions$Operations$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Projects$Regions$Operations$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + Params$Resource$Projects$Regions$Operations$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Operations$Cancel; + Params$Resource$Projects$Regions$Operations$Setiampolicy; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Operations$Cancel; + params = {} as Params$Resource$Projects$Regions$Operations$Setiampolicy; options = {}; } @@ -4391,115 +5868,74 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1/{+name}:cancel') + url: (rootUrl + '/v1/{+resource}:setIamPolicy') .replace(/([^:]\/)\/+/g, '$1'), method: 'POST' }, options), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['resource'], + pathParams: ['resource'], context: this.getRoot() }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * dataproc.projects.regions.operations.delete - * @desc Deletes a long-running operation. This method indicates that the - * client is no longer interested in the operation result. It does not - * cancel the operation. If the server doesn't support this method, it - * returns google.rpc.Code.UNIMPLEMENTED. - * @example - * * // BEFORE RUNNING: - * // --------------- - * // 1. If not already done, enable the Google Cloud Dataproc API - * // and check the quota for your project at - * // https://console.developers.google.com/apis/api/dataproc - * // 2. This sample uses Application Default Credentials for - * authentication. - * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk and run - * // `gcloud beta auth application-default login`. - * // For more information, see - * // - * https://developers.google.com/identity/protocols/application-default-credentials - * // 3. Install the Node.js client library by running - * // `npm install googleapis --save` - * - * var google = require('googleapis'); - * var dataproc = google.dataproc('v1'); - * - * authorize(function(authClient) { - * var request = { - * // The name of the operation resource to be deleted. - * name: - * 'projects/my-project/regions/my-region/operations/my-operation', // - * TODO: Update placeholder value. - * - * auth: authClient, - * }; - * - * dataproc.projects.regions.operations.delete(request, function(err) { - * if (err) { - * console.error(err); - * return; - * } - * }); - * }); - * - * function authorize(callback) { - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.error('authentication failed: ', err); - * return; - * } - * if (authClient.createScopedRequired && - * authClient.createScopedRequired()) { var scopes = - * ['https://www.googleapis.com/auth/cloud-platform']; authClient = - * authClient.createScoped(scopes); - * } - * callback(authClient); - * }); - * } - * @alias dataproc.projects.regions.operations.delete + * dataproc.projects.regions.operations.testIamPermissions + * @desc Returns permissions that a caller has on the specified resource. If + * the resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error.Note: This operation is designed to be + * used for building permission-aware UIs and command-line tools, not for + * authorization checking. This operation may "fail open" without warning. + * @alias dataproc.projects.regions.operations.testIamPermissions * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The name of the operation resource to be deleted. + * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * @param {().TestIamPermissionsRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - delete( - params?: Params$Resource$Projects$Regions$Operations$Delete, - options?: MethodOptions): AxiosPromise; - delete( - params: Params$Resource$Projects$Regions$Operations$Delete, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - delete( - params: Params$Resource$Projects$Regions$Operations$Delete, - callback: BodyResponseCallback): void; - delete(callback: BodyResponseCallback): void; - delete( - paramsOrCallback?: Params$Resource$Projects$Regions$Operations$Delete| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + testIamPermissions( + params?: Params$Resource$Projects$Regions$Operations$Testiampermissions, + options?: MethodOptions): + AxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Regions$Operations$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + testIamPermissions( + params: Params$Resource$Projects$Regions$Operations$Testiampermissions, + callback: BodyResponseCallback): + void; + testIamPermissions( + callback: BodyResponseCallback): + void; + testIamPermissions( + paramsOrCallback?: + Params$Resource$Projects$Regions$Operations$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Operations$Delete; + Params$Resource$Projects$Regions$Operations$Testiampermissions; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Operations$Delete; + params = {} as + Params$Resource$Projects$Regions$Operations$Testiampermissions; options = {}; } @@ -4512,179 +5948,186 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE' + url: (rootUrl + '/v1/{+resource}:testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' }, options), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['resource'], + pathParams: ['resource'], context: this.getRoot() }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest( + parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } + } + + export interface Params$Resource$Projects$Regions$Operations$Cancel { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the operation resource to be cancelled. + */ + name?: string; + } + export interface Params$Resource$Projects$Regions$Operations$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the operation resource to be deleted. + */ + name?: string; + } + export interface Params$Resource$Projects$Regions$Operations$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the operation resource. + */ + name?: string; + } + export interface Params$Resource$Projects$Regions$Operations$Getiampolicy { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy is being requested. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GetIamPolicyRequest; + } + export interface Params$Resource$Projects$Regions$Operations$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The standard list filter. + */ + filter?: string; + /** + * The name of the operation's parent resource. + */ + name?: string; + /** + * The standard list page size. + */ + pageSize?: number; + /** + * The standard list page token. + */ + pageToken?: string; + } + export interface Params$Resource$Projects$Regions$Operations$Setiampolicy { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy is being specified. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Regions$Operations$Testiampermissions { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + /** + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + */ + resource?: string; /** - * dataproc.projects.regions.operations.get - * @desc Gets the latest state of a long-running operation. Clients can use - * this method to poll the operation result at intervals as recommended by - * the API service. - * @example - * * // BEFORE RUNNING: - * // --------------- - * // 1. If not already done, enable the Google Cloud Dataproc API - * // and check the quota for your project at - * // https://console.developers.google.com/apis/api/dataproc - * // 2. This sample uses Application Default Credentials for - * authentication. - * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk and run - * // `gcloud beta auth application-default login`. - * // For more information, see - * // - * https://developers.google.com/identity/protocols/application-default-credentials - * // 3. Install the Node.js client library by running - * // `npm install googleapis --save` - * - * var google = require('googleapis'); - * var dataproc = google.dataproc('v1'); - * - * authorize(function(authClient) { - * var request = { - * // The name of the operation resource. - * name: - * 'projects/my-project/regions/my-region/operations/my-operation', // - * TODO: Update placeholder value. - * - * auth: authClient, - * }; - * - * dataproc.projects.regions.operations.get(request, function(err, - * response) { if (err) { console.error(err); return; - * } - * - * // TODO: Change code below to process the `response` object: - * console.log(JSON.stringify(response, null, 2)); - * }); - * }); - * - * function authorize(callback) { - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.error('authentication failed: ', err); - * return; - * } - * if (authClient.createScopedRequired && - * authClient.createScopedRequired()) { var scopes = - * ['https://www.googleapis.com/auth/cloud-platform']; authClient = - * authClient.createScoped(scopes); - * } - * callback(authClient); - * }); - * } - * @alias dataproc.projects.regions.operations.get - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.name The name of the operation resource. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object + * Request body metadata */ - get(params?: Params$Resource$Projects$Regions$Operations$Get, - options?: MethodOptions): AxiosPromise; - get(params: Params$Resource$Projects$Regions$Operations$Get, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - get(params: Params$Resource$Projects$Regions$Operations$Get, - callback: BodyResponseCallback): void; - get(callback: BodyResponseCallback): void; - get(paramsOrCallback?: Params$Resource$Projects$Regions$Operations$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Operations$Get; - let options = (optionsOrCallback || {}) as MethodOptions; + requestBody?: Schema$TestIamPermissionsRequest; + } - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Operations$Get; - options = {}; - } - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } + export class Resource$Projects$Regions$Workflowtemplates { + root: Dataproc; + constructor(root: Dataproc) { + this.root = root; + this.getRoot.bind(this); + } - const rootUrl = options.rootUrl || 'https://dataproc.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['name'], - pathParams: ['name'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } + getRoot() { + return this.root; } /** - * dataproc.projects.regions.operations.getIamPolicy - * @desc Gets the access control policy for a resource. Returns an empty - * policy if the resource exists and does not have a policy set. - * @alias dataproc.projects.regions.operations.getIamPolicy + * dataproc.projects.regions.workflowTemplates.create + * @desc Creates new workflow template. + * @alias dataproc.projects.regions.workflowTemplates.create * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. - * @param {().GetIamPolicyRequest} params.resource Request body data + * @param {string} params.parent Required. The "resource name" of the region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region} + * @param {().WorkflowTemplate} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - getIamPolicy( - params?: Params$Resource$Projects$Regions$Operations$Getiampolicy, - options?: MethodOptions): AxiosPromise; - getIamPolicy( - params: Params$Resource$Projects$Regions$Operations$Getiampolicy, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - getIamPolicy( - params: Params$Resource$Projects$Regions$Operations$Getiampolicy, - callback: BodyResponseCallback): void; - getIamPolicy(callback: BodyResponseCallback): void; - getIamPolicy( + create( + params?: Params$Resource$Projects$Regions$Workflowtemplates$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Projects$Regions$Workflowtemplates$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Projects$Regions$Workflowtemplates$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( paramsOrCallback?: - Params$Resource$Projects$Regions$Operations$Getiampolicy| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + Params$Resource$Projects$Regions$Workflowtemplates$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Operations$Getiampolicy; + Params$Resource$Projects$Regions$Workflowtemplates$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Operations$Getiampolicy; + params = {} as + Params$Resource$Projects$Regions$Workflowtemplates$Create; options = {}; } @@ -4697,141 +6140,129 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1/{+resource}:getIamPolicy') + url: (rootUrl + '/v1/{+parent}/workflowTemplates') .replace(/([^:]\/)\/+/g, '$1'), method: 'POST' }, options), params, - requiredParams: ['resource'], - pathParams: ['resource'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.getRoot() }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * dataproc.projects.regions.operations.list - * @desc Lists operations that match the specified filter in the request. If - * the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: - * the name binding allows API services to override the binding to use - * different resource name schemes, such as users/x/operations. To override - * the binding, API services can add a binding such as - * "/v1/{name=users/x}/operations" to their service configuration. For - * backwards compatibility, the default name includes the operations - * collection id, however overriding users must ensure the name binding is - * the parent resource, without the operations collection id. - * @example - * * // BEFORE RUNNING: - * // --------------- - * // 1. If not already done, enable the Google Cloud Dataproc API - * // and check the quota for your project at - * // https://console.developers.google.com/apis/api/dataproc - * // 2. This sample uses Application Default Credentials for - * authentication. - * // If not already done, install the gcloud CLI from - * // https://cloud.google.com/sdk and run - * // `gcloud beta auth application-default login`. - * // For more information, see - * // - * https://developers.google.com/identity/protocols/application-default-credentials - * // 3. Install the Node.js client library by running - * // `npm install googleapis --save` - * - * var google = require('googleapis'); - * var dataproc = google.dataproc('v1'); - * - * authorize(function(authClient) { - * var request = { - * // The name of the operation's parent resource. - * name: 'projects/my-project/regions/my-region/operations', // TODO: - * Update placeholder value. - * - * auth: authClient, - * }; - * - * var handlePage = function(err, response) { - * if (err) { - * console.error(err); - * return; - * } - * - * var operationsPage = response['operations']; - * if (!operationsPage) { - * return; - * } - * for (var i = 0; i < operationsPage.length; i++) { - * // TODO: Change code below to process each resource in - * `operationsPage`: console.log(JSON.stringify(operationsPage[i], null, - * 2)); - * } - * - * if (response.nextPageToken) { - * request.pageToken = response.nextPageToken; - * dataproc.projects.regions.operations.list(request, handlePage); - * } - * }; - * - * dataproc.projects.regions.operations.list(request, handlePage); - * }); + * dataproc.projects.regions.workflowTemplates.delete + * @desc Deletes a workflow template. It does not cancel in-progress + * workflows. + * @alias dataproc.projects.regions.workflowTemplates.delete + * @memberOf! () * - * function authorize(callback) { - * google.auth.getApplicationDefault(function(err, authClient) { - * if (err) { - * console.error('authentication failed: ', err); - * return; - * } - * if (authClient.createScopedRequired && - * authClient.createScopedRequired()) { var scopes = - * ['https://www.googleapis.com/auth/cloud-platform']; authClient = - * authClient.createScoped(scopes); - * } - * callback(authClient); - * }); - * } - * @alias dataproc.projects.regions.operations.list + * @param {object} params Parameters for request + * @param {string} params.name Required. The "resource name" of the workflow template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id} + * @param {integer=} params.version Optional. The version of workflow template to delete. If specified, will only delete the template if the current server version matches specified version. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete( + params?: Params$Resource$Projects$Regions$Workflowtemplates$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Projects$Regions$Workflowtemplates$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Projects$Regions$Workflowtemplates$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + Params$Resource$Projects$Regions$Workflowtemplates$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Regions$Workflowtemplates$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Regions$Workflowtemplates$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dataproc.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * dataproc.projects.regions.workflowTemplates.get + * @desc Retrieves the latest workflow template.Can retrieve previously + * instantiated template by specifying optional version parameter. + * @alias dataproc.projects.regions.workflowTemplates.get * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.filter The standard list filter. - * @param {string} params.name The name of the operation's parent resource. - * @param {integer=} params.pageSize The standard list page size. - * @param {string=} params.pageToken The standard list page token. + * @param {string} params.name Required. The "resource name" of the workflow template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id} + * @param {integer=} params.version Optional. The version of workflow template to retrieve. Only previously instatiated versions can be retrieved.If unspecified, retrieves the current version. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - list( - params?: Params$Resource$Projects$Regions$Operations$List, - options?: MethodOptions): AxiosPromise; - list( - params: Params$Resource$Projects$Regions$Operations$List, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Projects$Regions$Operations$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Projects$Regions$Operations$List| - BodyResponseCallback, + get(params?: Params$Resource$Projects$Regions$Workflowtemplates$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Projects$Regions$Workflowtemplates$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Projects$Regions$Workflowtemplates$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: + Params$Resource$Projects$Regions$Workflowtemplates$Get| + BodyResponseCallback, optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Operations$List; + Params$Resource$Projects$Regions$Workflowtemplates$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Operations$List; + params = {} as Params$Resource$Projects$Regions$Workflowtemplates$Get; options = {}; } @@ -4854,52 +6285,54 @@ export namespace dataproc_v1 { context: this.getRoot() }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * dataproc.projects.regions.operations.setIamPolicy - * @desc Sets the access control policy on the specified resource. Replaces - * any existing policy. - * @alias dataproc.projects.regions.operations.setIamPolicy + * dataproc.projects.regions.workflowTemplates.getIamPolicy + * @desc Gets the access control policy for a resource. Returns an empty + * policy if the resource exists and does not have a policy set. + * @alias dataproc.projects.regions.workflowTemplates.getIamPolicy * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. - * @param {().SetIamPolicyRequest} params.resource Request body data + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + * @param {().GetIamPolicyRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - setIamPolicy( - params?: Params$Resource$Projects$Regions$Operations$Setiampolicy, + getIamPolicy( + params?: + Params$Resource$Projects$Regions$Workflowtemplates$Getiampolicy, options?: MethodOptions): AxiosPromise; - setIamPolicy( - params: Params$Resource$Projects$Regions$Operations$Setiampolicy, + getIamPolicy( + params: Params$Resource$Projects$Regions$Workflowtemplates$Getiampolicy, options: MethodOptions|BodyResponseCallback, callback: BodyResponseCallback): void; - setIamPolicy( - params: Params$Resource$Projects$Regions$Operations$Setiampolicy, + getIamPolicy( + params: Params$Resource$Projects$Regions$Workflowtemplates$Getiampolicy, callback: BodyResponseCallback): void; - setIamPolicy(callback: BodyResponseCallback): void; - setIamPolicy( + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( paramsOrCallback?: - Params$Resource$Projects$Regions$Operations$Setiampolicy| + Params$Resource$Projects$Regions$Workflowtemplates$Getiampolicy| BodyResponseCallback, optionsOrCallback?: MethodOptions|BodyResponseCallback, callback?: BodyResponseCallback): void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Operations$Setiampolicy; + Params$Resource$Projects$Regions$Workflowtemplates$Getiampolicy; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Regions$Operations$Setiampolicy; + params = {} as + Params$Resource$Projects$Regions$Workflowtemplates$Getiampolicy; options = {}; } @@ -4912,7 +6345,7 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1/{+resource}:setIamPolicy') + url: (rootUrl + '/v1/{+resource}:getIamPolicy') .replace(/([^:]\/)\/+/g, '$1'), method: 'POST' }, @@ -4931,55 +6364,51 @@ export namespace dataproc_v1 { /** - * dataproc.projects.regions.operations.testIamPermissions - * @desc Returns permissions that a caller has on the specified resource. If - * the resource does not exist, this will return an empty set of - * permissions, not a NOT_FOUND error.Note: This operation is designed to be - * used for building permission-aware UIs and command-line tools, not for - * authorization checking. This operation may "fail open" without warning. - * @alias dataproc.projects.regions.operations.testIamPermissions + * dataproc.projects.regions.workflowTemplates.instantiate + * @desc Instantiates a template and begins execution.The returned Operation + * can be used to track execution of workflow by polling operations.get. The + * Operation will complete when entire workflow is finished.The running + * workflow can be aborted via operations.cancel. This will cause any + * inflight jobs to be cancelled and workflow-owned clusters to be + * deleted.The Operation.metadata will be WorkflowMetadata.On successful + * completion, Operation.response will be Empty. + * @alias dataproc.projects.regions.workflowTemplates.instantiate * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. - * @param {().TestIamPermissionsRequest} params.resource Request body data + * @param {string} params.name Required. The "resource name" of the workflow template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id} + * @param {().InstantiateWorkflowTemplateRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - testIamPermissions( - params?: Params$Resource$Projects$Regions$Operations$Testiampermissions, - options?: MethodOptions): - AxiosPromise; - testIamPermissions( - params: Params$Resource$Projects$Regions$Operations$Testiampermissions, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): - void; - testIamPermissions( - params: Params$Resource$Projects$Regions$Operations$Testiampermissions, - callback: BodyResponseCallback): - void; - testIamPermissions( - callback: BodyResponseCallback): - void; - testIamPermissions( + instantiate( + params?: Params$Resource$Projects$Regions$Workflowtemplates$Instantiate, + options?: MethodOptions): AxiosPromise; + instantiate( + params: Params$Resource$Projects$Regions$Workflowtemplates$Instantiate, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + instantiate( + params: Params$Resource$Projects$Regions$Workflowtemplates$Instantiate, + callback: BodyResponseCallback): void; + instantiate(callback: BodyResponseCallback): void; + instantiate( paramsOrCallback?: - Params$Resource$Projects$Regions$Operations$Testiampermissions| - BodyResponseCallback, + Params$Resource$Projects$Regions$Workflowtemplates$Instantiate| + BodyResponseCallback, optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Operations$Testiampermissions; + Params$Resource$Projects$Regions$Workflowtemplates$Instantiate; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; params = {} as - Params$Resource$Projects$Regions$Operations$Testiampermissions; + Params$Resource$Projects$Regions$Workflowtemplates$Instantiate; options = {}; } @@ -4992,187 +6421,152 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1/{+resource}:testIamPermissions') + url: (rootUrl + '/v1/{+name}:instantiate') .replace(/([^:]\/)\/+/g, '$1'), method: 'POST' }, options), - params, - requiredParams: ['resource'], - pathParams: ['resource'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest( - parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Projects$Regions$Operations$Cancel { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * The name of the operation resource to be cancelled. - */ - name?: string; - } - export interface Params$Resource$Projects$Regions$Operations$Delete { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * The name of the operation resource to be deleted. - */ - name?: string; - } - export interface Params$Resource$Projects$Regions$Operations$Get { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * The name of the operation resource. - */ - name?: string; - } - export interface Params$Resource$Projects$Regions$Operations$Getiampolicy { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * REQUIRED: The resource for which the policy is being requested. See the - * operation documentation for the appropriate value for this field. - */ - resource?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GetIamPolicyRequest; - } - export interface Params$Resource$Projects$Regions$Operations$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * The standard list filter. - */ - filter?: string; - /** - * The name of the operation's parent resource. - */ - name?: string; - /** - * The standard list page size. - */ - pageSize?: number; - /** - * The standard list page token. - */ - pageToken?: string; - } - export interface Params$Resource$Projects$Regions$Operations$Setiampolicy { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * REQUIRED: The resource for which the policy is being specified. See the - * operation documentation for the appropriate value for this field. - */ - resource?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$SetIamPolicyRequest; - } - export interface Params$Resource$Projects$Regions$Operations$Testiampermissions { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } - /** - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - */ - resource?: string; /** - * Request body metadata + * dataproc.projects.regions.workflowTemplates.instantiateInline + * @desc Instantiates a template and begins execution.This method is + * equivalent to executing the sequence CreateWorkflowTemplate, + * InstantiateWorkflowTemplate, DeleteWorkflowTemplate.The returned + * Operation can be used to track execution of workflow by polling + * operations.get. The Operation will complete when entire workflow is + * finished.The running workflow can be aborted via operations.cancel. This + * will cause any inflight jobs to be cancelled and workflow-owned clusters + * to be deleted.The Operation.metadata will be WorkflowMetadata.On + * successful completion, Operation.response will be Empty. + * @alias dataproc.projects.regions.workflowTemplates.instantiateInline + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The "resource name" of the workflow template region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region} + * @param {string=} params.requestId Optional. A tag that prevents multiple concurrent workflow instances with the same tag from running. This mitigates risk of concurrent instances started due to retries.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. + * @param {().WorkflowTemplate} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object */ - requestBody?: Schema$TestIamPermissionsRequest; - } + instantiateInline( + params?: + Params$Resource$Projects$Regions$Workflowtemplates$Instantiateinline, + options?: MethodOptions): AxiosPromise; + instantiateInline( + params: + Params$Resource$Projects$Regions$Workflowtemplates$Instantiateinline, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + instantiateInline( + params: + Params$Resource$Projects$Regions$Workflowtemplates$Instantiateinline, + callback: BodyResponseCallback): void; + instantiateInline(callback: BodyResponseCallback): void; + instantiateInline( + paramsOrCallback?: + Params$Resource$Projects$Regions$Workflowtemplates$Instantiateinline| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Regions$Workflowtemplates$Instantiateinline; + let options = (optionsOrCallback || {}) as MethodOptions; + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Regions$Workflowtemplates$Instantiateinline; + options = {}; + } - export class Resource$Projects$Regions$Workflowtemplates { - root: Dataproc; - constructor(root: Dataproc) { - this.root = root; - this.getRoot.bind(this); - } + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } - getRoot() { - return this.root; + const rootUrl = options.rootUrl || 'https://dataproc.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + + '/v1/{+parent}/workflowTemplates:instantiateInline') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } } /** - * dataproc.projects.regions.workflowTemplates.getIamPolicy - * @desc Gets the access control policy for a resource. Returns an empty - * policy if the resource exists and does not have a policy set. - * @alias dataproc.projects.regions.workflowTemplates.getIamPolicy + * dataproc.projects.regions.workflowTemplates.list + * @desc Lists workflows that match the specified filter in the request. + * @alias dataproc.projects.regions.workflowTemplates.list * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. - * @param {().GetIamPolicyRequest} params.resource Request body data + * @param {integer=} params.pageSize Optional. The maximum number of results to return in each response. + * @param {string=} params.pageToken Optional. The page token, returned by a previous call, to request the next page of results. + * @param {string} params.parent Required. The "resource name" of the region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region} * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - getIamPolicy( - params?: - Params$Resource$Projects$Regions$Workflowtemplates$Getiampolicy, - options?: MethodOptions): AxiosPromise; - getIamPolicy( - params: Params$Resource$Projects$Regions$Workflowtemplates$Getiampolicy, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - getIamPolicy( - params: Params$Resource$Projects$Regions$Workflowtemplates$Getiampolicy, - callback: BodyResponseCallback): void; - getIamPolicy(callback: BodyResponseCallback): void; - getIamPolicy( + list( + params?: Params$Resource$Projects$Regions$Workflowtemplates$List, + options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Projects$Regions$Workflowtemplates$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + list( + params: Params$Resource$Projects$Regions$Workflowtemplates$List, + callback: BodyResponseCallback): + void; + list(callback: BodyResponseCallback): + void; + list( paramsOrCallback?: - Params$Resource$Projects$Regions$Workflowtemplates$Getiampolicy| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + Params$Resource$Projects$Regions$Workflowtemplates$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Regions$Workflowtemplates$Getiampolicy; + Params$Resource$Projects$Regions$Workflowtemplates$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as - Params$Resource$Projects$Regions$Workflowtemplates$Getiampolicy; + params = {} as Params$Resource$Projects$Regions$Workflowtemplates$List; options = {}; } @@ -5185,20 +6579,22 @@ export namespace dataproc_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1/{+resource}:getIamPolicy') + url: (rootUrl + '/v1/{+parent}/workflowTemplates') .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' + method: 'GET' }, options), params, - requiredParams: ['resource'], - pathParams: ['resource'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.getRoot() }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest( + parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters); } } @@ -5356,8 +6752,134 @@ export namespace dataproc_v1 { return createAPIRequest(parameters); } } + + + /** + * dataproc.projects.regions.workflowTemplates.update + * @desc Updates (replaces) workflow template. The updated template must + * contain version that matches the current server version. + * @alias dataproc.projects.regions.workflowTemplates.update + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Output only. The "resource name" of the template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id} + * @param {().WorkflowTemplate} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + update( + params?: Params$Resource$Projects$Regions$Workflowtemplates$Update, + options?: MethodOptions): AxiosPromise; + update( + params: Params$Resource$Projects$Regions$Workflowtemplates$Update, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + update( + params: Params$Resource$Projects$Regions$Workflowtemplates$Update, + callback: BodyResponseCallback): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: + Params$Resource$Projects$Regions$Workflowtemplates$Update| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Regions$Workflowtemplates$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Regions$Workflowtemplates$Update; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dataproc.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Regions$Workflowtemplates$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The "resource name" of the region, as described in + * https://cloud.google.com/apis/design/resource_names of the form + * projects/{project_id}/regions/{region} + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$WorkflowTemplate; + } + export interface Params$Resource$Projects$Regions$Workflowtemplates$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The "resource name" of the workflow template, as described in + * https://cloud.google.com/apis/design/resource_names of the form + * projects/{project_id}/regions/{region}/workflowTemplates/{template_id} + */ + name?: string; + /** + * Optional. The version of workflow template to delete. If specified, will + * only delete the template if the current server version matches specified + * version. + */ + version?: number; } + export interface Params$Resource$Projects$Regions$Workflowtemplates$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + /** + * Required. The "resource name" of the workflow template, as described in + * https://cloud.google.com/apis/design/resource_names of the form + * projects/{project_id}/regions/{region}/workflowTemplates/{template_id} + */ + name?: string; + /** + * Optional. The version of workflow template to retrieve. Only previously + * instatiated versions can be retrieved.If unspecified, retrieves the + * current version. + */ + version?: number; + } export interface Params$Resource$Projects$Regions$Workflowtemplates$Getiampolicy { /** * Auth client or API Key for the request @@ -5375,6 +6897,73 @@ export namespace dataproc_v1 { */ requestBody?: Schema$GetIamPolicyRequest; } + export interface Params$Resource$Projects$Regions$Workflowtemplates$Instantiate { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The "resource name" of the workflow template, as described in + * https://cloud.google.com/apis/design/resource_names of the form + * projects/{project_id}/regions/{region}/workflowTemplates/{template_id} + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstantiateWorkflowTemplateRequest; + } + export interface Params$Resource$Projects$Regions$Workflowtemplates$Instantiateinline { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The "resource name" of the workflow template region, as + * described in https://cloud.google.com/apis/design/resource_names of the + * form projects/{project_id}/regions/{region} + */ + parent?: string; + /** + * Optional. A tag that prevents multiple concurrent workflow instances with + * the same tag from running. This mitigates risk of concurrent instances + * started due to retries.It is recommended to always set this value to a + * UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The + * tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), + * and hyphens (-). The maximum length is 40 characters. + */ + requestId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$WorkflowTemplate; + } + export interface Params$Resource$Projects$Regions$Workflowtemplates$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Optional. The maximum number of results to return in each response. + */ + pageSize?: number; + /** + * Optional. The page token, returned by a previous call, to request the + * next page of results. + */ + pageToken?: string; + /** + * Required. The "resource name" of the region, as described in + * https://cloud.google.com/apis/design/resource_names of the form + * projects/{project_id}/regions/{region} + */ + parent?: string; + } export interface Params$Resource$Projects$Regions$Workflowtemplates$Setiampolicy { /** * Auth client or API Key for the request @@ -5409,4 +6998,22 @@ export namespace dataproc_v1 { */ requestBody?: Schema$TestIamPermissionsRequest; } + export interface Params$Resource$Projects$Regions$Workflowtemplates$Update { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Output only. The "resource name" of the template, as described in + * https://cloud.google.com/apis/design/resource_names of the form + * projects/{project_id}/regions/{region}/workflowTemplates/{template_id} + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$WorkflowTemplate; + } } diff --git a/src/apis/dataproc/v1beta2.ts b/src/apis/dataproc/v1beta2.ts index 51613ed7330..b3d9eea627a 100644 --- a/src/apis/dataproc/v1beta2.ts +++ b/src/apis/dataproc/v1beta2.ts @@ -679,7 +679,7 @@ export namespace dataproc_v1beta2 { instanceId?: string; /** * Optional. Map from parameter names to values that should be used for - * those parameters. + * those parameters. Values may not exceed 100 characters. */ parameters?: any; /** @@ -1285,6 +1285,10 @@ export namespace dataproc_v1beta2 { * version. */ imageVersion?: string; + /** + * The set of optional components to activate on the cluster. + */ + optionalComponents?: string[]; /** * Optional. The properties to set on daemon config files.Property keys are * specified in prefix:property format, such as core:fs.defaultFS. The @@ -2124,8 +2128,9 @@ export namespace dataproc_v1beta2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.instanceId Optional. A tag that prevents multiple concurrent workflow instances with the same tag from running. This mitigates risk of concurrent instances started due to retries.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. + * @param {string=} params.instanceId Deprecated. Please use request_id field instead. * @param {string} params.parent Required. The "resource name" of the workflow template region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region} + * @param {string=} params.requestId Optional. A tag that prevents multiple concurrent workflow instances with the same tag from running. This mitigates risk of concurrent instances started due to retries.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. * @param {().WorkflowTemplate} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -2590,12 +2595,7 @@ export namespace dataproc_v1beta2 { auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Optional. A tag that prevents multiple concurrent workflow instances with - * the same tag from running. This mitigates risk of concurrent instances - * started due to retries.It is recommended to always set this value to a - * UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The - * tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), - * and hyphens (-). The maximum length is 40 characters. + * Deprecated. Please use request_id field instead. */ instanceId?: string; /** @@ -2604,6 +2604,15 @@ export namespace dataproc_v1beta2 { * form projects/{project_id}/regions/{region} */ parent?: string; + /** + * Optional. A tag that prevents multiple concurrent workflow instances with + * the same tag from running. This mitigates risk of concurrent instances + * started due to retries.It is recommended to always set this value to a + * UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The + * tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), + * and hyphens (-). The maximum length is 40 characters. + */ + requestId?: string; /** * Request body metadata @@ -5504,8 +5513,9 @@ export namespace dataproc_v1beta2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.instanceId Optional. A tag that prevents multiple concurrent workflow instances with the same tag from running. This mitigates risk of concurrent instances started due to retries.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. + * @param {string=} params.instanceId Deprecated. Please use request_id field instead. * @param {string} params.parent Required. The "resource name" of the workflow template region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region} + * @param {string=} params.requestId Optional. A tag that prevents multiple concurrent workflow instances with the same tag from running. This mitigates risk of concurrent instances started due to retries.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. * @param {().WorkflowTemplate} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -5967,12 +5977,7 @@ export namespace dataproc_v1beta2 { auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Optional. A tag that prevents multiple concurrent workflow instances with - * the same tag from running. This mitigates risk of concurrent instances - * started due to retries.It is recommended to always set this value to a - * UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The - * tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), - * and hyphens (-). The maximum length is 40 characters. + * Deprecated. Please use request_id field instead. */ instanceId?: string; /** @@ -5981,6 +5986,15 @@ export namespace dataproc_v1beta2 { * form projects/{project_id}/regions/{region} */ parent?: string; + /** + * Optional. A tag that prevents multiple concurrent workflow instances with + * the same tag from running. This mitigates risk of concurrent instances + * started due to retries.It is recommended to always set this value to a + * UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The + * tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), + * and hyphens (-). The maximum length is 40 characters. + */ + requestId?: string; /** * Request body metadata diff --git a/src/apis/dialogflow/v2.ts b/src/apis/dialogflow/v2.ts index c5d4e8f2b9c..1f4d2f4e10b 100644 --- a/src/apis/dialogflow/v2.ts +++ b/src/apis/dialogflow/v2.ts @@ -131,7 +131,7 @@ export namespace dialogflow_v2 { */ export interface Schema$GoogleCloudDialogflowV2BatchCreateEntitiesRequest { /** - * Required. The collection of entities to create. + * Required. The entities to create. */ entities?: Schema$GoogleCloudDialogflowV2EntityTypeEntity[]; /** @@ -181,12 +181,11 @@ export namespace dialogflow_v2 { intents?: Schema$GoogleCloudDialogflowV2Intent[]; } /** - * The response message for EntityTypes.BatchCreateEntities. + * The request message for EntityTypes.BatchUpdateEntities. */ export interface Schema$GoogleCloudDialogflowV2BatchUpdateEntitiesRequest { /** - * Required. The collection of new entities to replace the existing - * entities. + * Required. The entities to update or create. */ entities?: Schema$GoogleCloudDialogflowV2EntityTypeEntity[]; /** @@ -206,7 +205,7 @@ export namespace dialogflow_v2 { */ export interface Schema$GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest { /** - * The collection of entity type to update or create. + * The collection of entity types to update or create. */ entityTypeBatchInline?: Schema$GoogleCloudDialogflowV2EntityTypeBatch; /** @@ -450,8 +449,9 @@ export namespace dialogflow_v2 { */ events?: string[]; /** - * Optional. Collection of information about all followup intents that have - * name of this intent as a root_name. + * Read-only. Information about all followup intents that have this intent + * as a direct or indirect parent. We populate this field only in the + * output. */ followupIntentInfo?: Schema$GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo[]; @@ -508,9 +508,12 @@ export namespace dialogflow_v2 { */ parameters?: Schema$GoogleCloudDialogflowV2beta1IntentParameter[]; /** - * The unique identifier of the parent intent in the chain of followup - * intents. It identifies the parent followup intent. Format: - * `projects/<Project ID>/agent/intents/<Intent ID>`. + * Read-only after creation. The unique identifier of the parent intent in + * the chain of followup intents. You can set this field when creating an + * intent, for example with CreateIntent or BatchUpdateIntents, in order to + * make this intent a followup intent. It identifies the parent followup + * intent. Format: `projects/<Project ID>/agent/intents/<Intent + * ID>`. */ parentFollowupIntentName?: string; /** @@ -524,10 +527,10 @@ export namespace dialogflow_v2 { */ resetContexts?: boolean; /** - * The unique identifier of the root intent in the chain of followup - * intents. It identifies the correct followup intents chain for this - * intent. Format: `projects/<Project ID>/agent/intents/<Intent - * ID>`. + * Read-only. The unique identifier of the root intent in the chain of + * followup intents. It identifies the correct followup intents chain for + * this intent. We populate this field only in the output. Format: + * `projects/<Project ID>/agent/intents/<Intent ID>`. */ rootFollowupIntentName?: string; /** @@ -550,7 +553,7 @@ export namespace dialogflow_v2 { */ followupIntentName?: string; /** - * The unique identifier of the followup intent parent. Format: + * The unique identifier of the followup intent's parent. Format: * `projects/<Project ID>/agent/intents/<Intent ID>`. */ parentFollowupIntentName?: string; @@ -1589,8 +1592,9 @@ export namespace dialogflow_v2 { */ events?: string[]; /** - * Optional. Collection of information about all followup intents that have - * name of this intent as a root_name. + * Read-only. Information about all followup intents that have this intent + * as a direct or indirect parent. We populate this field only in the + * output. */ followupIntentInfo?: Schema$GoogleCloudDialogflowV2IntentFollowupIntentInfo[]; @@ -1635,9 +1639,12 @@ export namespace dialogflow_v2 { */ parameters?: Schema$GoogleCloudDialogflowV2IntentParameter[]; /** - * The unique identifier of the parent intent in the chain of followup - * intents. It identifies the parent followup intent. Format: - * `projects/<Project ID>/agent/intents/<Intent ID>`. + * Read-only after creation. The unique identifier of the parent intent in + * the chain of followup intents. You can set this field when creating an + * intent, for example with CreateIntent or BatchUpdateIntents, in order to + * make this intent a followup intent. It identifies the parent followup + * intent. Format: `projects/<Project ID>/agent/intents/<Intent + * ID>`. */ parentFollowupIntentName?: string; /** @@ -1651,10 +1658,10 @@ export namespace dialogflow_v2 { */ resetContexts?: boolean; /** - * The unique identifier of the root intent in the chain of followup - * intents. It identifies the correct followup intents chain for this - * intent. Format: `projects/<Project ID>/agent/intents/<Intent - * ID>`. + * Read-only. The unique identifier of the root intent in the chain of + * followup intents. It identifies the correct followup intents chain for + * this intent. We populate this field only in the output. Format: + * `projects/<Project ID>/agent/intents/<Intent ID>`. */ rootFollowupIntentName?: string; /** @@ -1686,7 +1693,7 @@ export namespace dialogflow_v2 { */ followupIntentName?: string; /** - * The unique identifier of the followup intent parent. Format: + * The unique identifier of the followup intent's parent. Format: * `projects/<Project ID>/agent/intents/<Intent ID>`. */ parentFollowupIntentName?: string; @@ -3878,9 +3885,8 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall /** * dialogflow.projects.agent.entityTypes.entities.batchCreate - * @desc Creates multiple new entities in the specified entity type (extends - * the existing collection of entries). Operation + * @desc Creates multiple new entities in the specified entity type. + * Operation * @alias dialogflow.projects.agent.entityTypes.entities.batchCreate * @memberOf! () * @@ -4038,14 +4044,15 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall /** * dialogflow.projects.agent.entityTypes.entities.batchUpdate - * @desc Updates entities in the specified entity type (replaces the - * existing collection of entries). Operation * @alias dialogflow.projects.agent.entityTypes.entities.batchUpdate * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The name of the entity type to update the entities in. Format: `projects//agent/entityTypes/`. + * @param {string} params.parent Required. The name of the entity type to update or create entities in. Format: `projects//agent/entityTypes/`. * @param {().GoogleCloudDialogflowV2BatchUpdateEntitiesRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -4157,8 +4164,8 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Required. The name of the entity type to update the entities in. Format: - * `projects//agent/entityTypes/`. + * Required. The name of the entity type to update or create entities in. + * Format: `projects//agent/entityTypes/`. */ parent?: string; @@ -4414,12 +4421,13 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall /** * dialogflow.projects.agent.intents.delete - * @desc Deletes the specified intent. + * @desc Deletes the specified intent and its direct or indirect followup + * intents. * @alias dialogflow.projects.agent.intents.delete * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The name of the intent to delete. Format: `projects//agent/intents/`. + * @param {string} params.name Required. The name of the intent to delete. If this intent has direct or indirect followup intents, we also delete them. Format: `projects//agent/intents/`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -4775,8 +4783,9 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Required. The name of the intent to delete. Format: `projects//agent/intents/`. + * Required. The name of the intent to delete. If this intent has direct or + * indirect followup intents, we also delete them. Format: + * `projects//agent/intents/`. */ name?: string; } diff --git a/src/apis/dialogflow/v2beta1.ts b/src/apis/dialogflow/v2beta1.ts index 4f1f499ca1d..c82f53d861b 100644 --- a/src/apis/dialogflow/v2beta1.ts +++ b/src/apis/dialogflow/v2beta1.ts @@ -149,7 +149,7 @@ export namespace dialogflow_v2beta1 { */ export interface Schema$GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest { /** - * Required. The collection of entities to create. + * Required. The entities to create. */ entities?: Schema$GoogleCloudDialogflowV2beta1EntityTypeEntity[]; /** @@ -199,12 +199,11 @@ export namespace dialogflow_v2beta1 { intents?: Schema$GoogleCloudDialogflowV2beta1Intent[]; } /** - * The response message for EntityTypes.BatchCreateEntities. + * The request message for EntityTypes.BatchUpdateEntities. */ export interface Schema$GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest { /** - * Required. The collection of new entities to replace the existing - * entities. + * Required. The entities to update or create. */ entities?: Schema$GoogleCloudDialogflowV2beta1EntityTypeEntity[]; /** @@ -224,7 +223,7 @@ export namespace dialogflow_v2beta1 { */ export interface Schema$GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest { /** - * The collection of entity type to update or create. + * The collection of entity types to update or create. */ entityTypeBatchInline?: Schema$GoogleCloudDialogflowV2beta1EntityTypeBatch; /** @@ -652,8 +651,9 @@ export namespace dialogflow_v2beta1 { */ events?: string[]; /** - * Optional. Collection of information about all followup intents that have - * name of this intent as a root_name. + * Read-only. Information about all followup intents that have this intent + * as a direct or indirect parent. We populate this field only in the + * output. */ followupIntentInfo?: Schema$GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo[]; @@ -710,9 +710,12 @@ export namespace dialogflow_v2beta1 { */ parameters?: Schema$GoogleCloudDialogflowV2beta1IntentParameter[]; /** - * The unique identifier of the parent intent in the chain of followup - * intents. It identifies the parent followup intent. Format: - * `projects/<Project ID>/agent/intents/<Intent ID>`. + * Read-only after creation. The unique identifier of the parent intent in + * the chain of followup intents. You can set this field when creating an + * intent, for example with CreateIntent or BatchUpdateIntents, in order to + * make this intent a followup intent. It identifies the parent followup + * intent. Format: `projects/<Project ID>/agent/intents/<Intent + * ID>`. */ parentFollowupIntentName?: string; /** @@ -726,10 +729,10 @@ export namespace dialogflow_v2beta1 { */ resetContexts?: boolean; /** - * The unique identifier of the root intent in the chain of followup - * intents. It identifies the correct followup intents chain for this - * intent. Format: `projects/<Project ID>/agent/intents/<Intent - * ID>`. + * Read-only. The unique identifier of the root intent in the chain of + * followup intents. It identifies the correct followup intents chain for + * this intent. We populate this field only in the output. Format: + * `projects/<Project ID>/agent/intents/<Intent ID>`. */ rootFollowupIntentName?: string; /** @@ -761,7 +764,7 @@ export namespace dialogflow_v2beta1 { */ followupIntentName?: string; /** - * The unique identifier of the followup intent parent. Format: + * The unique identifier of the followup intent's parent. Format: * `projects/<Project ID>/agent/intents/<Intent ID>`. */ parentFollowupIntentName?: string; @@ -2035,8 +2038,9 @@ export namespace dialogflow_v2beta1 { */ events?: string[]; /** - * Optional. Collection of information about all followup intents that have - * name of this intent as a root_name. + * Read-only. Information about all followup intents that have this intent + * as a direct or indirect parent. We populate this field only in the + * output. */ followupIntentInfo?: Schema$GoogleCloudDialogflowV2IntentFollowupIntentInfo[]; @@ -2081,9 +2085,12 @@ export namespace dialogflow_v2beta1 { */ parameters?: Schema$GoogleCloudDialogflowV2IntentParameter[]; /** - * The unique identifier of the parent intent in the chain of followup - * intents. It identifies the parent followup intent. Format: - * `projects/<Project ID>/agent/intents/<Intent ID>`. + * Read-only after creation. The unique identifier of the parent intent in + * the chain of followup intents. You can set this field when creating an + * intent, for example with CreateIntent or BatchUpdateIntents, in order to + * make this intent a followup intent. It identifies the parent followup + * intent. Format: `projects/<Project ID>/agent/intents/<Intent + * ID>`. */ parentFollowupIntentName?: string; /** @@ -2097,10 +2104,10 @@ export namespace dialogflow_v2beta1 { */ resetContexts?: boolean; /** - * The unique identifier of the root intent in the chain of followup - * intents. It identifies the correct followup intents chain for this - * intent. Format: `projects/<Project ID>/agent/intents/<Intent - * ID>`. + * Read-only. The unique identifier of the root intent in the chain of + * followup intents. It identifies the correct followup intents chain for + * this intent. We populate this field only in the output. Format: + * `projects/<Project ID>/agent/intents/<Intent ID>`. */ rootFollowupIntentName?: string; /** @@ -2123,7 +2130,7 @@ export namespace dialogflow_v2beta1 { */ followupIntentName?: string; /** - * The unique identifier of the followup intent parent. Format: + * The unique identifier of the followup intent's parent. Format: * `projects/<Project ID>/agent/intents/<Intent ID>`. */ parentFollowupIntentName?: string; @@ -4127,9 +4134,8 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall /** * dialogflow.projects.agent.entityTypes.entities.batchCreate - * @desc Creates multiple new entities in the specified entity type (extends - * the existing collection of entries). Operation + * @desc Creates multiple new entities in the specified entity type. + * Operation * @alias dialogflow.projects.agent.entityTypes.entities.batchCreate * @memberOf! () * @@ -4287,14 +4293,15 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall /** * dialogflow.projects.agent.entityTypes.entities.batchUpdate - * @desc Updates entities in the specified entity type (replaces the - * existing collection of entries). Operation * @alias dialogflow.projects.agent.entityTypes.entities.batchUpdate * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The name of the entity type to update the entities in. Format: `projects//agent/entityTypes/`. + * @param {string} params.parent Required. The name of the entity type to update or create entities in. Format: `projects//agent/entityTypes/`. * @param {().GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -4406,8 +4413,8 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Required. The name of the entity type to update the entities in. Format: - * `projects//agent/entityTypes/`. + * Required. The name of the entity type to update or create entities in. + * Format: `projects//agent/entityTypes/`. */ parent?: string; @@ -5972,12 +5979,13 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall /** * dialogflow.projects.agent.intents.delete - * @desc Deletes the specified intent. + * @desc Deletes the specified intent and its direct or indirect followup + * intents. * @alias dialogflow.projects.agent.intents.delete * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The name of the intent to delete. Format: `projects//agent/intents/`. + * @param {string} params.name Required. The name of the intent to delete. If this intent has direct or indirect followup intents, we also delete them. Format: `projects//agent/intents/`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -6343,8 +6351,9 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Required. The name of the intent to delete. Format: `projects//agent/intents/`. + * Required. The name of the intent to delete. If this intent has direct or + * indirect followup intents, we also delete them. Format: + * `projects//agent/intents/`. */ name?: string; } diff --git a/src/apis/dlp/v2.ts b/src/apis/dlp/v2.ts index 3fbaffac846..f02e2e35991 100644 --- a/src/apis/dlp/v2.ts +++ b/src/apis/dlp/v2.ts @@ -719,9 +719,14 @@ export namespace dlp_v2 { * A list of phrases to detect as a CustomInfoType. */ dictionary?: Schema$GooglePrivacyDlpV2Dictionary; + exclusionType?: string; /** - * All CustomInfoTypes must have a name that does not conflict with built-in - * InfoTypes or other CustomInfoTypes. + * CustomInfoType can either be a new infoType, or an extension of built-in + * infoType, when the name matches one of existing infoTypes and that + * infoType is specified in `InspectContent.info_types` field. Specifying + * the latter adds findings to the one detected by the system. If built-in + * info type is not specified in `InspectContent.info_types` list then the + * name is treated as a custom info type. */ infoType?: Schema$GooglePrivacyDlpV2InfoType; /** @@ -1126,6 +1131,44 @@ export namespace dlp_v2 { */ timestamps?: string[]; } + /** + * List of exclude infoTypes. + */ + export interface Schema$GooglePrivacyDlpV2ExcludeInfoTypes { + /** + * InfoType list in ExclusionRule rule drops a finding when it overlaps or + * contained within with a finding of an infoType from this list. For + * example, for `InspectionRuleSet.info_types` containing + * "PHONE_NUMBER"` and `exclusion_rule` containing + * `exclude_info_types.info_types` with "EMAIL_ADDRESS" the phone + * number findings are dropped if they overlap with EMAIL_ADDRESS finding. + * That leads to "555-222-2222@example.org" to generate only a + * single finding, namely email address. + */ + infoTypes?: Schema$GooglePrivacyDlpV2InfoType[]; + } + /** + * The rule that specifies conditions when findings of infoTypes specified in + * `InspectionRuleSet` are removed from results. + */ + export interface Schema$GooglePrivacyDlpV2ExclusionRule { + /** + * Dictionary which defines the rule. + */ + dictionary?: Schema$GooglePrivacyDlpV2Dictionary; + /** + * Set of infoTypes for which findings would affect this rule. + */ + excludeInfoTypes?: Schema$GooglePrivacyDlpV2ExcludeInfoTypes; + /** + * How the rule is applied, see MatchingType documentation for details. + */ + matchingType?: string; + /** + * Regular expression which defines the rule. + */ + regex?: Schema$GooglePrivacyDlpV2Regex; + } /** * An expression, consisting or an operator and conditions. */ @@ -1462,6 +1505,12 @@ export namespace dlp_v2 { * POSSIBLE. See https://cloud.google.com/dlp/docs/likelihood to learn more. */ minLikelihood?: string; + /** + * Set of rules to apply to the findings for this InspectConfig. Exclusion + * rules, contained in the set are executed in the end, other rules are + * executed in the order they are specified for each info type. + */ + ruleSet?: Schema$GooglePrivacyDlpV2InspectionRuleSet[]; } /** * Request to search for potentially sensitive info in a ContentItem. @@ -1507,6 +1556,35 @@ export namespace dlp_v2 { */ result?: Schema$GooglePrivacyDlpV2Result; } + /** + * A single inspection rule to be applied to infoTypes, specified in + * `InspectionRuleSet`. + */ + export interface Schema$GooglePrivacyDlpV2InspectionRule { + /** + * Exclusion rule. + */ + exclusionRule?: Schema$GooglePrivacyDlpV2ExclusionRule; + /** + * Hotword-based detection rule. + */ + hotwordRule?: Schema$GooglePrivacyDlpV2HotwordRule; + } + /** + * Rule set for modifying a set of infoTypes to alter behavior under certain + * circumstances, depending on the specific details of the rules within the + * set. + */ + export interface Schema$GooglePrivacyDlpV2InspectionRuleSet { + /** + * List of infoTypes this rule set is applied to. + */ + infoTypes?: Schema$GooglePrivacyDlpV2InfoType[]; + /** + * Set of rules to be applied to infoTypes. The rules are applied in order. + */ + rules?: Schema$GooglePrivacyDlpV2InspectionRule[]; + } export interface Schema$GooglePrivacyDlpV2InspectJobConfig { /** * Actions to execute at the completion of the job. Are executed in the @@ -3015,23 +3093,25 @@ export namespace dlp_v2 { message?: string; } /** - * Represents a whole calendar date, e.g. date of birth. The time of day and - * time zone are either specified elsewhere or are not significant. The date - * is relative to the Proleptic Gregorian Calendar. The day may be 0 to - * represent a year and month where the day is not significant, e.g. credit - * card expiration date. The year may be 0 to represent a month and day - * independent of year, e.g. anniversary date. Related types are + * Represents a whole or partial calendar date, e.g. a birthday. The time of + * day and time zone are either specified elsewhere or are not significant. + * The date is relative to the Proleptic Gregorian Calendar. This can + * represent: * A full date, with non-zero year, month and day values * A + * month and day value, with a zero year, e.g. an anniversary * A year on its + * own, with zero month and day values * A year and month value, with a zero + * day, e.g. a credit card expiration date Related types are * google.type.TimeOfDay and `google.protobuf.Timestamp`. */ export interface Schema$GoogleTypeDate { /** * Day of month. Must be from 1 to 31 and valid for the year and month, or 0 - * if specifying a year/month where the day is not significant. + * if specifying a year by itself or a year and month where the day is not + * significant. */ day?: number; /** - * Month of year. Must be from 1 to 12, or 0 if specifying a date without a - * month. + * Month of year. Must be from 1 to 12, or 0 if specifying a year without a + * month and day. */ month?: number; /** diff --git a/src/apis/adexchangeseller/README.md b/src/apis/file/README.md similarity index 88% rename from src/apis/adexchangeseller/README.md rename to src/apis/file/README.md index b0f38f349e0..c8d6459c584 100644 --- a/src/apis/adexchangeseller/README.md +++ b/src/apis/file/README.md @@ -1,13 +1,13 @@ Google Inc. logo -# @google/adexchangeseller +# @google/file -> Accesses the inventory of Ad Exchange seller users and generates reports. +> The Cloud Filestore API is used for creating and managing cloud file servers. ## Installation ```sh -$ npm install @google/adexchangeseller +$ npm install @google/file ``` ## Usage diff --git a/src/apis/file/index.ts b/src/apis/file/index.ts new file mode 100644 index 00000000000..2388c1a18af --- /dev/null +++ b/src/apis/file/index.ts @@ -0,0 +1,29 @@ +// Copyright 2018, Google, LLC. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! THIS FILE IS AUTO-GENERATED */ + +import {getAPI, GoogleConfigurable} from 'googleapis-common'; +import {file_v1beta1} from './v1beta1'; + +export const VERSIONS = { + 'v1beta1': file_v1beta1.File, +}; + +export function file(version: 'v1beta1'): file_v1beta1.File; +export function file(options: file_v1beta1.Options): file_v1beta1.File; +export function file( + this: GoogleConfigurable, + versionOrOptions: 'v1beta1'|file_v1beta1.Options) { + return getAPI('file', versionOrOptions, VERSIONS, this); +} diff --git a/src/apis/adexchangeseller/package.json b/src/apis/file/package.json similarity index 87% rename from src/apis/adexchangeseller/package.json rename to src/apis/file/package.json index beb19c8b2f1..ffe926ca18d 100644 --- a/src/apis/adexchangeseller/package.json +++ b/src/apis/file/package.json @@ -1,7 +1,7 @@ { - "name": "@google/adexchangeseller", + "name": "@google/file", "version": "0.1.0", - "description": "adexchangeseller", + "description": "file", "main": "index.js", "types": "index.d.ts", "keywords": ["google"], diff --git a/src/apis/file/v1beta1.ts b/src/apis/file/v1beta1.ts new file mode 100644 index 00000000000..b2b39bb86c4 --- /dev/null +++ b/src/apis/file/v1beta1.ts @@ -0,0 +1,1532 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {AxiosPromise} from 'axios'; +import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; +import {BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace file_v1beta1 { + export interface Options extends GlobalOptions { + version: 'v1beta1'; + } + + /** + * Cloud Filestore API + * + * The Cloud Filestore API is used for creating and managing cloud file + * servers. + * + * @example + * const {google} = require('googleapis'); + * const file = google.file('v1beta1'); + * + * @namespace file + * @type {Function} + * @version v1beta1 + * @variation v1beta1 + * @param {object=} options Options for File + */ + export class File { + _options: GlobalOptions; + google?: GoogleConfigurable; + root = this; + + projects: Resource$Projects; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this._options = options || {}; + this.google = google; + this.getRoot.bind(this); + + this.projects = new Resource$Projects(this); + } + + getRoot() { + return this.root; + } + } + + /** + * The request message for Operations.CancelOperation. + */ + export interface Schema$CancelOperationRequest {} + /** + * The sets of network addresses and DNS names for hosts to which a given + * export or share should be allowed or denied. + */ + export interface Schema$ClientList { + /** + * DNS names of hosts, with optional wildcards. + */ + hostNames?: string[]; + /** + * IPv4 addresses in the format {octet 1}.{octet 2}.{octet 3}.{octet 4}. + */ + ipAddresses?: string[]; + } + /** + * A generic empty message that you can re-use to avoid defining duplicated + * empty messages in your APIs. A typical example is to use it as the request + * or the response type of an API method. For instance: service Foo { rpc + * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON + * representation for `Empty` is empty JSON object `{}`. + */ + export interface Schema$Empty {} + /** + * File share export specification. + */ + export interface Schema$Export { + /** + * The clients which may connect. + */ + allowedClients?: Schema$ClientList; + /** + * Writes may be completed when not yet on stable storage. + */ + async?: boolean; + /** + * The clients which may not connect. + */ + deniedClients?: Schema$ClientList; + /** + * Networks on which the export should appear. If none are specified, the + * default is all networks to which the instance is connected to. + */ + networks?: Schema$NetworkConfig[]; + /** + * Export rule for NFS + */ + nfsExport?: Schema$NfsExport; + /** + * Path to export (either "" or of the form + * /file_share_name[/subdir]). + */ + path?: string; + /** + * Whether the file share should be exported as read-only. + */ + readOnly?: boolean; + /** + * Export rule for SMB + */ + smbExport?: Schema$SmbExport; + } + /** + * File share configuration for the instance. + */ + export interface Schema$FileShareConfig { + /** + * File share capacity in gigabytes (GB). Cloud Filestore defines 1 GB as + * 1024^3 bytes. + */ + capacityGb?: string; + /** + * Delete requested. The file share will be deleted. + */ + deleted?: boolean; + /** + * Service enabled. When enabled, the instance exposes the exports to the + * user for mounting. + */ + enabled?: boolean; + /** + * Exports. If protocols and exports are both zero-length, a default + * protocol of NFSV3 and a default export of "*" are provided, and + * enabled is set to true. + */ + exports?: Schema$Export[]; + /** + * The name of the file share (must be 16 characters or less). + */ + name?: string; + /** + * Protocols supported. + */ + protocols?: string[]; + } + /** + * A Cloud Filestore instance. + */ + export interface Schema$Instance { + /** + * Output only. The time when the instance was created. + */ + createTime?: string; + /** + * Optional. A description of the instance (2048 characters or less). + */ + description?: string; + /** + * Server-specified ETag for the instance resource to prevent simultaneous + * updates from overwriting each other. + */ + etag?: string; + /** + * File system shares on the instance. For this version, only a single file + * share is supported. + */ + fileShares?: Schema$FileShareConfig[]; + /** + * Resource labels to represent user provided metadata. + */ + labels?: any; + /** + * The logging service the instance should use to write logs. Currently + * available options: * `logging.googleapis.com` - the Google Cloud Logging + * service. * `none` - no logs will be exported from the instance. * if left + * as an empty string,`logging.googleapis.com` will be used. + */ + loggingService?: string; + /** + * The monitoring service the instance should use to write metrics. + * Currently available options: * `monitoring.googleapis.com` - the Google + * Cloud Monitoring service. * `none` - no metrics will be exported from the + * instance. * if left as an empty string, `monitoring.googleapis.com` will + * be used. + */ + monitoringService?: string; + /** + * Output only. The resource name of the instance, in the format + * projects/{project_id}/locations/{location_id}/instances/{instance_id}. + */ + name?: string; + /** + * VPC networks to which the instance is connected. For this version, only a + * single network is supported. + */ + networks?: Schema$NetworkConfig[]; + /** + * Output only. The instance state. + */ + state?: string; + /** + * Output only. Additional information about the instance state, if + * available. + */ + statusMessage?: string; + /** + * The service tier of the instance. + */ + tier?: string; + } + /** + * ListInstancesResponse is the result of ListInstancesRequest. + */ + export interface Schema$ListInstancesResponse { + /** + * A list of instances in the project for the specified location. If the + * {location} value in the request is "-", the response contains a + * list of instances from all locations. If any location is unreachable, the + * response will only return instances in reachable locations and the + * "unreachable" field will be populated with a list of + * unreachable locations. + */ + instances?: Schema$Instance[]; + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + */ + nextPageToken?: string; + /** + * Locations that could not be reached. + */ + unreachable?: string[]; + } + /** + * The response message for Locations.ListLocations. + */ + export interface Schema$ListLocationsResponse { + /** + * A list of locations that matches the specified filter in the request. + */ + locations?: Schema$Location[]; + /** + * The standard List next-page token. + */ + nextPageToken?: string; + } + /** + * The response message for Operations.ListOperations. + */ + export interface Schema$ListOperationsResponse { + /** + * The standard List next-page token. + */ + nextPageToken?: string; + /** + * A list of operations that matches the specified filter in the request. + */ + operations?: Schema$Operation[]; + } + /** + * A resource that represents Google Cloud Platform location. + */ + export interface Schema$Location { + /** + * The friendly name for this location, typically a nearby city name. For + * example, "Tokyo". + */ + displayName?: string; + /** + * Cross-service attributes for the location. For example + * {"cloud.googleapis.com/region": "us-east1"} + */ + labels?: any; + /** + * The canonical id for this location. For example: `"us-east1"`. + */ + locationId?: string; + /** + * Service-specific metadata. For example the available capacity at the + * given location. + */ + metadata?: any; + /** + * Resource name for the location, which may vary between implementations. + * For example: `"projects/example-project/locations/us-east1"` + */ + name?: string; + } + /** + * Network configuration for the instance. + */ + export interface Schema$NetworkConfig { + /** + * Output only. IPv4 addresses in the format {octet 1}.{octet 2}.{octet + * 3}.{octet 4} or IPv6 addresses in the format {block 1}:{block 2}:{block + * 3}:{block 4}:{block 5}:{block 6}:{block 7}:{block 8}. + */ + ipAddresses?: string[]; + /** + * Internet protocol versions for which the instance has IP addresses + * assigned. For this version, only MODE_IPV4 is supported. + */ + modes?: string[]; + /** + * The name of the Google Compute Engine [VPC + * network](/compute/docs/networks-and-firewalls#networks) to which the + * instance is connected. + */ + network?: string; + /** + * A /29 CIDR block in one of the [internal IP address + * ranges](https://www.arin.net/knowledge/address_filters.html) that + * identifies the range of IP addresses reserved for this instance. For + * example, 10.0.0.0/29 or 192.168.0.0/29. The range you specify can't + * overlap with either existing subnets or assigned IP address ranges for + * other Cloud Filestore instances in the selected VPC network. + */ + reservedIpRange?: string; + /** + * Output only. The name of the Google Compute Engine + * [subnetwork](/compute/docs/subnetworks) to which the instance is + * connected. + */ + subnetwork?: string; + } + /** + * NfsExport specifies attributes of a given NFS export rule. + */ + export interface Schema$NfsExport { + /** + * GID for anonymous or squashed GIDs. + */ + anonymousGid?: string; + /** + * UID for anonymous or squashed UIDs. + */ + anonymousUid?: string; + /** + * Network transport protocols to be enabled. The default is TCP. + */ + protocols?: string[]; + /** + * The mode of mapping of UIDs and GIDs (if any). + */ + squash?: string; + /** + * If unauthenticated_locks_allowed is true, locking requests do not require + * authentication. + */ + unauthenticatedLocksAllowed?: boolean; + /** + * If user_ports_allowed is true, client ports greater than or equal to 1024 + * are allowed. + */ + userPortsAllowed?: boolean; + } + /** + * This resource represents a long-running operation that is the result of a + * network API call. + */ + export interface Schema$Operation { + /** + * If the value is `false`, it means the operation is still in progress. If + * `true`, the operation is completed, and either `error` or `response` is + * available. + */ + done?: boolean; + /** + * The error result of the operation in case of failure or cancellation. + */ + error?: Schema$Status; + /** + * Service-specific metadata associated with the operation. It typically + * contains progress information and common metadata such as create time. + * Some services might not provide such metadata. Any method that returns a + * long-running operation should document the metadata type, if any. + */ + metadata?: any; + /** + * The server-assigned name, which is only unique within the same service + * that originally returns it. If you use the default HTTP mapping, the + * `name` should have the format of `operations/some/unique/name`. + */ + name?: string; + /** + * The normal response of the operation in case of success. If the original + * method returns no data on success, such as `Delete`, the response is + * `google.protobuf.Empty`. If the original method is standard + * `Get`/`Create`/`Update`, the response should be the resource. For other + * methods, the response should have the type `XxxResponse`, where `Xxx` is + * the original method name. For example, if the original method name is + * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + */ + response?: any; + } + /** + * Represents the metadata of the long-running operation. + */ + export interface Schema$OperationMetadata { + /** + * [Output only] API version used to start the operation. + */ + apiVersion?: string; + /** + * [Output only] Identifies whether the user has requested cancellation of + * the operation. Operations that have successfully been cancelled have + * Operation.error value with a google.rpc.Status.code of 1, corresponding + * to `Code.CANCELLED`. + */ + cancelRequested?: boolean; + /** + * [Output only] The time the operation was created. + */ + createTime?: string; + /** + * [Output only] The time the operation finished running. + */ + endTime?: string; + /** + * [Output only] Human-readable status of the operation, if any. + */ + statusDetail?: string; + /** + * [Output only] Server-defined resource path for the target of the + * operation. + */ + target?: string; + /** + * [Output only] Name of the verb executed by the operation. + */ + verb?: string; + } + /** + * SmbExport defines attributes of a given SMB sharing rule. + */ + export interface Schema$SmbExport { + /** + * If true, allow clients to see this share when browsing the instance for + * shares. + */ + browsable?: boolean; + /** + * The published name of the share (if different from name). + */ + fileShare?: string; + } + /** + * The `Status` type defines a logical error model that is suitable for + * different programming environments, including REST APIs and RPC APIs. It is + * used by [gRPC](https://github.com/grpc). The error model is designed to be: + * - Simple to use and understand for most users - Flexible enough to meet + * unexpected needs # Overview The `Status` message contains three pieces of + * data: error code, error message, and error details. The error code should + * be an enum value of google.rpc.Code, but it may accept additional error + * codes if needed. The error message should be a developer-facing English + * message that helps developers *understand* and *resolve* the error. If a + * localized user-facing error message is needed, put the localized message in + * the error details or localize it in the client. The optional error details + * may contain arbitrary information about the error. There is a predefined + * set of error detail types in the package `google.rpc` that can be used for + * common error conditions. # Language mapping The `Status` message is the + * logical representation of the error model, but it is not necessarily the + * actual wire format. When the `Status` message is exposed in different + * client libraries and different wire protocols, it can be mapped + * differently. For example, it will likely be mapped to some exceptions in + * Java, but more likely mapped to some error codes in C. # Other uses The + * error model and the `Status` message can be used in a variety of + * environments, either with or without APIs, to provide a consistent + * developer experience across different environments. Example uses of this + * error model include: - Partial errors. If a service needs to return + * partial errors to the client, it may embed the `Status` in the normal + * response to indicate the partial errors. - Workflow errors. A typical + * workflow has multiple steps. Each step may have a `Status` message for + * error reporting. - Batch operations. If a client uses batch request and + * batch response, the `Status` message should be used directly inside + * batch response, one for each error sub-response. - Asynchronous + * operations. If an API call embeds asynchronous operation results in its + * response, the status of those operations should be represented directly + * using the `Status` message. - Logging. If some API errors are stored in + * logs, the message `Status` could be used directly after any stripping + * needed for security/privacy reasons. + */ + export interface Schema$Status { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set + * of message types for APIs to use. + */ + details?: any[]; + /** + * A developer-facing error message, which should be in English. Any + * user-facing error message should be localized and sent in the + * google.rpc.Status.details field, or localized by the client. + */ + message?: string; + } + + + export class Resource$Projects { + root: File; + locations: Resource$Projects$Locations; + constructor(root: File) { + this.root = root; + this.getRoot.bind(this); + this.locations = new Resource$Projects$Locations(root); + } + + getRoot() { + return this.root; + } + } + + + export class Resource$Projects$Locations { + root: File; + instances: Resource$Projects$Locations$Instances; + operations: Resource$Projects$Locations$Operations; + constructor(root: File) { + this.root = root; + this.getRoot.bind(this); + this.instances = new Resource$Projects$Locations$Instances(root); + this.operations = new Resource$Projects$Locations$Operations(root); + } + + getRoot() { + return this.root; + } + + + /** + * file.projects.locations.get + * @desc Gets information about a location. + * @alias file.projects.locations.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Resource name for the location. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Projects$Locations$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Projects$Locations$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Projects$Locations$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Projects$Locations$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Locations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://file.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * file.projects.locations.list + * @desc Lists information about the supported locations for this service. + * @alias file.projects.locations.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The standard list filter. + * @param {string} params.name The resource that owns the locations collection, if applicable. + * @param {integer=} params.pageSize The standard list page size. + * @param {string=} params.pageToken The standard list page token. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: Params$Resource$Projects$Locations$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Projects$Locations$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Projects$Locations$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Projects$Locations$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Locations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://file.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}/locations') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Resource name for the location. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The standard list filter. + */ + filter?: string; + /** + * The resource that owns the locations collection, if applicable. + */ + name?: string; + /** + * The standard list page size. + */ + pageSize?: number; + /** + * The standard list page token. + */ + pageToken?: string; + } + + export class Resource$Projects$Locations$Instances { + root: File; + constructor(root: File) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * file.projects.locations.instances.create + * @desc Creates an instance. + * @alias file.projects.locations.instances.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.instanceId The name of the instance to create. The name must be unique for the specified project and location. + * @param {string} params.parent The instance's project and location, in the format projects/{project_id}/locations/{location}. In Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. + * @param {().Instance} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params?: Params$Resource$Projects$Locations$Instances$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Projects$Locations$Instances$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Projects$Locations$Instances$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Projects$Locations$Instances$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Locations$Instances$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Instances$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://file.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/instances') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * file.projects.locations.instances.delete + * @desc Deletes an instance. + * @alias file.projects.locations.instances.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The instance resource name, in the format projects/{project_id}/locations/{location}/instances/{instance_id} + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete( + params?: Params$Resource$Projects$Locations$Instances$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Instances$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Projects$Locations$Instances$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Projects$Locations$Instances$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Locations$Instances$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Instances$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://file.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * file.projects.locations.instances.get + * @desc Gets the details of a specific instance. + * @alias file.projects.locations.instances.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The instance resource name, in the format projects/{project_id}/locations/{location}/instances/{instance_id}. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Projects$Locations$Instances$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Projects$Locations$Instances$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Projects$Locations$Instances$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Projects$Locations$Instances$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Locations$Instances$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Instances$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://file.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * file.projects.locations.instances.list + * @desc Lists all instances in a project for either a specified location or + * for all locations. + * @alias file.projects.locations.instances.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter List filter. + * @param {string=} params.orderBy Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {integer=} params.pageSize The maximum number of items to return. + * @param {string=} params.pageToken The next_page_token value to use if there are additional results to retrieve for this list request. + * @param {string} params.parent The project and location for which to retrieve instance information, in the format projects/{project_id}/locations/{location}. In Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To retrieve instance information for all locations, use "-" for the {location} value. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: Params$Resource$Projects$Locations$Instances$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Projects$Locations$Instances$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Projects$Locations$Instances$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Projects$Locations$Instances$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Locations$Instances$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Instances$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://file.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/instances') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * file.projects.locations.instances.patch + * @desc Updates the settings of a specific instance. + * @alias file.projects.locations.instances.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Output only. The resource name of the instance, in the format projects/{project_id}/locations/{location_id}/instances/{instance_id}. + * @param {string=} params.updateMask Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields: "description" + * @param {().Instance} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Projects$Locations$Instances$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Instances$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Projects$Locations$Instances$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Projects$Locations$Instances$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Locations$Instances$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Instances$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://file.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Instances$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the instance to create. The name must be unique for the + * specified project and location. + */ + instanceId?: string; + /** + * The instance's project and location, in the format + * projects/{project_id}/locations/{location}. In Cloud Filestore, locations + * map to GCP zones, for example **us-west1-b**. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Instance; + } + export interface Params$Resource$Projects$Locations$Instances$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The instance resource name, in the format + * projects/{project_id}/locations/{location}/instances/{instance_id} + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Instances$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The instance resource name, in the format + * projects/{project_id}/locations/{location}/instances/{instance_id}. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Instances$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * List filter. + */ + filter?: string; + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + */ + orderBy?: string; + /** + * The maximum number of items to return. + */ + pageSize?: number; + /** + * The next_page_token value to use if there are additional results to + * retrieve for this list request. + */ + pageToken?: string; + /** + * The project and location for which to retrieve instance information, in + * the format projects/{project_id}/locations/{location}. In Cloud + * Filestore, locations map to GCP zones, for example **us-west1-b**. To + * retrieve instance information for all locations, use "-" for the + * {location} value. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Instances$Patch { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Output only. The resource name of the instance, in the format + * projects/{project_id}/locations/{location_id}/instances/{instance_id}. + */ + name?: string; + /** + * Mask of fields to update. At least one path must be supplied in this + * field. The elements of the repeated paths field may only include these + * fields: "description" + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Instance; + } + + + export class Resource$Projects$Locations$Operations { + root: File; + constructor(root: File) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * file.projects.locations.operations.cancel + * @desc Starts asynchronous cancellation on a long-running operation. The + * server makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation + * or other methods to check whether the cancellation succeeded or whether + * the operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with an + * Operation.error value with a google.rpc.Status.code of 1, corresponding + * to `Code.CANCELLED`. + * @alias file.projects.locations.operations.cancel + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource to be cancelled. + * @param {().CancelOperationRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + cancel( + params?: Params$Resource$Projects$Locations$Operations$Cancel, + options?: MethodOptions): AxiosPromise; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + callback: BodyResponseCallback): void; + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: Params$Resource$Projects$Locations$Operations$Cancel| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Locations$Operations$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Cancel; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://file.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}:cancel') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * file.projects.locations.operations.delete + * @desc Deletes a long-running operation. This method indicates that the + * client is no longer interested in the operation result. It does not + * cancel the operation. If the server doesn't support this method, it + * returns `google.rpc.Code.UNIMPLEMENTED`. + * @alias file.projects.locations.operations.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource to be deleted. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete( + params?: Params$Resource$Projects$Locations$Operations$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Projects$Locations$Operations$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Locations$Operations$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://file.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * file.projects.locations.operations.get + * @desc Gets the latest state of a long-running operation. Clients can use + * this method to poll the operation result at intervals as recommended by + * the API service. + * @alias file.projects.locations.operations.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Projects$Locations$Operations$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Projects$Locations$Operations$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Projects$Locations$Operations$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Projects$Locations$Operations$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Locations$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://file.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * file.projects.locations.operations.list + * @desc Lists operations that match the specified filter in the request. If + * the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: + * the `name` binding allows API services to override the binding to use + * different resource name schemes, such as `users/x/operations`. To + * override the binding, API services can add a binding such as + * `"/v1/{name=users/x}/operations"` to their service configuration. For + * backwards compatibility, the default name includes the operations + * collection id, however overriding users must ensure the name binding is + * the parent resource, without the operations collection id. + * @alias file.projects.locations.operations.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The standard list filter. + * @param {string} params.name The name of the operation's parent resource. + * @param {integer=} params.pageSize The standard list page size. + * @param {string=} params.pageToken The standard list page token. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: Params$Resource$Projects$Locations$Operations$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Projects$Locations$Operations$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Projects$Locations$Operations$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Projects$Locations$Operations$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Locations$Operations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://file.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}/operations') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Operations$Cancel { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the operation resource to be cancelled. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CancelOperationRequest; + } + export interface Params$Resource$Projects$Locations$Operations$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the operation resource to be deleted. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Operations$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the operation resource. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Operations$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The standard list filter. + */ + filter?: string; + /** + * The name of the operation's parent resource. + */ + name?: string; + /** + * The standard list page size. + */ + pageSize?: number; + /** + * The standard list page token. + */ + pageToken?: string; + } +} diff --git a/src/apis/firestore/README.md b/src/apis/firestore/README.md index ef1c50690cf..b0f9a41da72 100644 --- a/src/apis/firestore/README.md +++ b/src/apis/firestore/README.md @@ -2,7 +2,7 @@ # @google/firestore -> +> Accesses the NoSQL document database built for automatic scaling, high performance, and ease of application development. ## Installation diff --git a/src/apis/firestore/v1beta2.ts b/src/apis/firestore/v1beta2.ts index 5df42b7d760..9cf5b7666e7 100644 --- a/src/apis/firestore/v1beta2.ts +++ b/src/apis/firestore/v1beta2.ts @@ -65,6 +65,14 @@ export namespace firestore_v1beta2 { } } + /** + * A generic empty message that you can re-use to avoid defining duplicated + * empty messages in your APIs. A typical example is to use it as the request + * or the response type of an API method. For instance: service Foo { rpc + * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON + * representation for `Empty` is empty JSON object `{}`. + */ + export interface Schema$Empty {} /** * Represents a single field in the database. Fields are grouped by their * "Collection Group", which represent all collections in the @@ -238,6 +246,38 @@ export namespace firestore_v1beta2 { */ order?: string; } + /** + * Metadata for google.longrunning.Operation results from + * FirestoreAdmin.CreateIndex. + */ + export interface Schema$GoogleFirestoreAdminV1beta2IndexOperationMetadata { + /** + * The time this operation completed. Will be unset if operation still in + * progress. + */ + endTime?: string; + /** + * The index resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + */ + index?: string; + /** + * The progress, in bytes, of this operation. + */ + progressBytes?: Schema$GoogleFirestoreAdminV1beta2Progress; + /** + * The progress, in documents, of this operation. + */ + progressDocuments?: Schema$GoogleFirestoreAdminV1beta2Progress; + /** + * The time this operation started. + */ + startTime?: string; + /** + * The state of the operation. + */ + state?: string; + } /** * The response for FirestoreAdmin.ListFields. */ @@ -252,6 +292,20 @@ export namespace firestore_v1beta2 { */ nextPageToken?: string; } + /** + * The response for FirestoreAdmin.ListIndexes. + */ + export interface Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse { + /** + * The requested indexes. + */ + indexes?: Schema$GoogleFirestoreAdminV1beta2Index[]; + /** + * A page token that may be used to request another page of results. If + * blank, this is the last page. + */ + nextPageToken?: string; + } /** * Describes the progress of the operation. Unit of work is generic and must * be interpreted based on where Progress is used. @@ -377,10 +431,13 @@ export namespace firestore_v1beta2 { export class Resource$Projects$Databases { root: Firestore; + collectionGroup: Resource$Projects$Databases$Collectiongroup; collectionGroups: Resource$Projects$Databases$Collectiongroups; constructor(root: Firestore) { this.root = root; this.getRoot.bind(this); + this.collectionGroup = + new Resource$Projects$Databases$Collectiongroup(root); this.collectionGroups = new Resource$Projects$Databases$Collectiongroups(root); } @@ -391,14 +448,255 @@ export namespace firestore_v1beta2 { } + export class Resource$Projects$Databases$Collectiongroup { + root: Firestore; + indexes: Resource$Projects$Databases$Collectiongroup$Indexes; + constructor(root: Firestore) { + this.root = root; + this.getRoot.bind(this); + this.indexes = + new Resource$Projects$Databases$Collectiongroup$Indexes(root); + } + + getRoot() { + return this.root; + } + } + + + export class Resource$Projects$Databases$Collectiongroup$Indexes { + root: Firestore; + constructor(root: Firestore) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * firestore.projects.databases.collectionGroup.indexes.create + * @desc Creates a composite index. This returns a + * google.longrunning.Operation which may be used to track the status of the + * creation. The metadata for the operation will be the type + * IndexOperationMetadata. + * @alias firestore.projects.databases.collectionGroup.indexes.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent A parent name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * @param {().GoogleFirestoreAdminV1beta2Index} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params?: + Params$Resource$Projects$Databases$Collectiongroup$Indexes$Create, + options?: MethodOptions): + AxiosPromise; + create( + params: + Params$Resource$Projects$Databases$Collectiongroup$Indexes$Create, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + create( + params: + Params$Resource$Projects$Databases$Collectiongroup$Indexes$Create, + callback: BodyResponseCallback): + void; + create(callback: BodyResponseCallback): + void; + create( + paramsOrCallback?: + Params$Resource$Projects$Databases$Collectiongroup$Indexes$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Databases$Collectiongroup$Indexes$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Databases$Collectiongroup$Indexes$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://firestore.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta2/{+parent}/indexes') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * firestore.projects.databases.collectionGroup.indexes.list + * @desc Lists composite indexes. + * @alias firestore.projects.databases.collectionGroup.indexes.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The filter to apply to list results. + * @param {integer=} params.pageSize The number of results to return. + * @param {string=} params.pageToken A page token, returned from a previous call to FirestoreAdmin.ListIndexes, that may be used to get the next page of results. + * @param {string} params.parent A parent name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: + Params$Resource$Projects$Databases$Collectiongroup$Indexes$List, + options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Projects$Databases$Collectiongroup$Indexes$List, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>, + callback: BodyResponseCallback< + Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>): void; + list( + params: Params$Resource$Projects$Databases$Collectiongroup$Indexes$List, + callback: BodyResponseCallback< + Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>): void; + list(callback: BodyResponseCallback< + Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>): void; + list( + paramsOrCallback?: + Params$Resource$Projects$Databases$Collectiongroup$Indexes$List| + BodyResponseCallback< + Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>, + callback?: BodyResponseCallback< + Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>): void| + AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Databases$Collectiongroup$Indexes$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Databases$Collectiongroup$Indexes$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://firestore.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta2/{+parent}/indexes') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>(parameters); + } + } + } + + export interface Params$Resource$Projects$Databases$Collectiongroup$Indexes$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleFirestoreAdminV1beta2Index; + } + export interface Params$Resource$Projects$Databases$Collectiongroup$Indexes$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The filter to apply to list results. + */ + filter?: string; + /** + * The number of results to return. + */ + pageSize?: number; + /** + * A page token, returned from a previous call to + * FirestoreAdmin.ListIndexes, that may be used to get the next page of + * results. + */ + pageToken?: string; + /** + * A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + */ + parent?: string; + } + + + export class Resource$Projects$Databases$Collectiongroups { root: Firestore; fields: Resource$Projects$Databases$Collectiongroups$Fields; + indexes: Resource$Projects$Databases$Collectiongroups$Indexes; constructor(root: Firestore) { this.root = root; this.getRoot.bind(this); this.fields = new Resource$Projects$Databases$Collectiongroups$Fields(root); + this.indexes = + new Resource$Projects$Databases$Collectiongroups$Indexes(root); } getRoot() { @@ -747,4 +1045,188 @@ export namespace firestore_v1beta2 { */ requestBody?: Schema$GoogleFirestoreAdminV1beta2Field; } + + + export class Resource$Projects$Databases$Collectiongroups$Indexes { + root: Firestore; + constructor(root: Firestore) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * firestore.projects.databases.collectionGroups.indexes.delete + * @desc Deletes a composite index. + * @alias firestore.projects.databases.collectionGroups.indexes.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name A name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete( + params?: + Params$Resource$Projects$Databases$Collectiongroups$Indexes$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: + Params$Resource$Projects$Databases$Collectiongroups$Indexes$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: + Params$Resource$Projects$Databases$Collectiongroups$Indexes$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + Params$Resource$Projects$Databases$Collectiongroups$Indexes$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Databases$Collectiongroups$Indexes$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Databases$Collectiongroups$Indexes$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://firestore.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * firestore.projects.databases.collectionGroups.indexes.get + * @desc Gets a composite index. + * @alias firestore.projects.databases.collectionGroups.indexes.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name A name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: + Params$Resource$Projects$Databases$Collectiongroups$Indexes$Get, + options?: MethodOptions): + AxiosPromise; + get(params: Params$Resource$Projects$Databases$Collectiongroups$Indexes$Get, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + get(params: Params$Resource$Projects$Databases$Collectiongroups$Indexes$Get, + callback: + BodyResponseCallback): + void; + get(callback: + BodyResponseCallback): + void; + get(paramsOrCallback?: + Params$Resource$Projects$Databases$Collectiongroups$Indexes$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Databases$Collectiongroups$Indexes$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Databases$Collectiongroups$Indexes$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://firestore.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + } + + export interface Params$Resource$Projects$Databases$Collectiongroups$Indexes$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + */ + name?: string; + } + export interface Params$Resource$Projects$Databases$Collectiongroups$Indexes$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + */ + name?: string; + } } diff --git a/src/apis/games/v1.ts b/src/apis/games/v1.ts index 9bfc5400e6c..2da8eb7d442 100644 --- a/src/apis/games/v1.ts +++ b/src/apis/games/v1.ts @@ -3364,6 +3364,7 @@ export namespace games_v1 { * * @param {object} params Parameters for request * @param {string} params.achievementId The ID of the achievement used by this method. + * @param {string=} params.builtinGameId Override used only by built-in games in Play Games application. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -3434,6 +3435,7 @@ export namespace games_v1 { * @memberOf! () * * @param {object} params Parameters for request + * @param {string=} params.builtinGameId Override used only by built-in games in Play Games application. * @param {().AchievementUpdateMultipleRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -3594,6 +3596,10 @@ export namespace games_v1 { * The ID of the achievement used by this method. */ achievementId?: string; + /** + * Override used only by built-in games in Play Games application. + */ + builtinGameId?: string; } export interface Params$Resource$Achievements$Updatemultiple { /** @@ -3601,6 +3607,10 @@ export namespace games_v1 { */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + /** + * Override used only by built-in games in Play Games application. + */ + builtinGameId?: string; /** * Request body metadata diff --git a/src/apis/genomics/v1.ts b/src/apis/genomics/v1.ts index 474a8930fd3..e5b3ccbf30d 100644 --- a/src/apis/genomics/v1.ts +++ b/src/apis/genomics/v1.ts @@ -5888,7 +5888,9 @@ export namespace genomics_v1 { * server makes a best effort to cancel the operation, but success is not * guaranteed. Clients may use Operations.GetOperation or * Operations.ListOperations to check whether the cancellation succeeded or - * the operation completed despite cancellation. + * the operation completed despite cancellation. Authorization requires the + * following [Google IAM](https://cloud.google.com/iam) permission: * + * `genomics.operations.cancel` * @example * * // BEFORE RUNNING: * // --------------- @@ -6008,9 +6010,11 @@ export namespace genomics_v1 { /** * genomics.operations.get - * @desc Gets the latest state of a long-running operation. Clients can use + * @desc Gets the latest state of a long-running operation. Clients can use * this method to poll the operation result at intervals as recommended by - * the API service. + * the API service. Authorization requires the following [Google + * IAM](https://cloud.google.com/iam) permission: * + * `genomics.operations.get` * @example * * // BEFORE RUNNING: * // --------------- @@ -6125,6 +6129,9 @@ export namespace genomics_v1 { /** * genomics.operations.list * @desc Lists operations that match the specified filter in the request. + * Authorization requires the following [Google + * IAM](https://cloud.google.com/iam) permission: * + * `genomics.operations.list` * @example * * // BEFORE RUNNING: * // --------------- diff --git a/src/apis/genomics/v1alpha2.ts b/src/apis/genomics/v1alpha2.ts index 17d9595bceb..1653ab5da62 100644 --- a/src/apis/genomics/v1alpha2.ts +++ b/src/apis/genomics/v1alpha2.ts @@ -936,7 +936,9 @@ export namespace genomics_v1alpha2 { * server makes a best effort to cancel the operation, but success is not * guaranteed. Clients may use Operations.GetOperation or * Operations.ListOperations to check whether the cancellation succeeded or - * the operation completed despite cancellation. + * the operation completed despite cancellation. Authorization requires the + * following [Google IAM](https://cloud.google.com/iam) permission: * + * `genomics.operations.cancel` * @example * * // BEFORE RUNNING: * // --------------- @@ -1056,9 +1058,11 @@ export namespace genomics_v1alpha2 { /** * genomics.operations.get - * @desc Gets the latest state of a long-running operation. Clients can use + * @desc Gets the latest state of a long-running operation. Clients can use * this method to poll the operation result at intervals as recommended by - * the API service. + * the API service. Authorization requires the following [Google + * IAM](https://cloud.google.com/iam) permission: * + * `genomics.operations.get` * @example * * // BEFORE RUNNING: * // --------------- @@ -1174,6 +1178,9 @@ export namespace genomics_v1alpha2 { /** * genomics.operations.list * @desc Lists operations that match the specified filter in the request. + * Authorization requires the following [Google + * IAM](https://cloud.google.com/iam) permission: * + * `genomics.operations.list` * @example * * // BEFORE RUNNING: * // --------------- diff --git a/src/apis/genomics/v2alpha1.ts b/src/apis/genomics/v2alpha1.ts index f75d7a94b78..d0caf6207ca 100644 --- a/src/apis/genomics/v2alpha1.ts +++ b/src/apis/genomics/v2alpha1.ts @@ -975,7 +975,9 @@ export namespace genomics_v2alpha1 { * automatically when the Cloud Genomics API is first enabled, but if you * delete this permission, or if you enabled the Cloud Genomics API before * the v2alpha1 API launch, you must disable and re-enable the API to grant - * the Genomics Service Agent the required permissions. [1]: /genomics/gsa + * the Genomics Service Agent the required permissions. Authorization + * requires the following [Google IAM](https://cloud.google.com/iam/) + * permission: * `genomics.operations.create` [1]: /genomics/gsa * @alias genomics.pipelines.run * @memberOf! () * @@ -1082,7 +1084,9 @@ export namespace genomics_v2alpha1 { * server makes a best effort to cancel the operation, but success is not * guaranteed. Clients may use Operations.GetOperation or * Operations.ListOperations to check whether the cancellation succeeded or - * the operation completed despite cancellation. + * the operation completed despite cancellation. Authorization requires the + * following [Google IAM](https://cloud.google.com/iam) permission: * + * `genomics.operations.cancel` * @alias genomics.projects.operations.cancel * @memberOf! () * @@ -1149,9 +1153,11 @@ export namespace genomics_v2alpha1 { /** * genomics.projects.operations.get - * @desc Gets the latest state of a long-running operation. Clients can use + * @desc Gets the latest state of a long-running operation. Clients can use * this method to poll the operation result at intervals as recommended by - * the API service. + * the API service. Authorization requires the following [Google + * IAM](https://cloud.google.com/iam) permission: * + * `genomics.operations.get` * @alias genomics.projects.operations.get * @memberOf! () * @@ -1215,6 +1221,9 @@ export namespace genomics_v2alpha1 { /** * genomics.projects.operations.list * @desc Lists operations that match the specified filter in the request. + * Authorization requires the following [Google + * IAM](https://cloud.google.com/iam) permission: * + * `genomics.operations.list` * @alias genomics.projects.operations.list * @memberOf! () * diff --git a/src/apis/iam/v1.ts b/src/apis/iam/v1.ts index 3b207de1e53..0fac9c7e843 100644 --- a/src/apis/iam/v1.ts +++ b/src/apis/iam/v1.ts @@ -642,7 +642,9 @@ export namespace iam_v1 { */ name?: string; /** - * The current launch stage of the role. + * The current launch stage of the role. If the `ALPHA` launch stage has + * been selected for a role, the `stage` field will not be included in the + * returned definition for the role. */ stage?: string; /** diff --git a/src/apis/iamcredentials/v1.ts b/src/apis/iamcredentials/v1.ts index b24c7f0a28b..bba7690e442 100644 --- a/src/apis/iamcredentials/v1.ts +++ b/src/apis/iamcredentials/v1.ts @@ -345,7 +345,7 @@ export namespace iamcredentials_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. Using `-` as a wildcard for the project will infer the project from the account. + * @param {string} params.name The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. Use hyphen as placeholder for project id since there is no project context for this API. * @param {().GenerateIdentityBindingAccessTokenRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -659,8 +659,9 @@ export namespace iamcredentials_v1 { /** * The resource name of the service account for which the credentials are * requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. Using `-` as a - * wildcard for the project will infer the project from the account. + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. Use hyphen as + * placeholder for project id since there is no project context for this + * API. */ name?: string; diff --git a/src/apis/iap/v1beta1.ts b/src/apis/iap/v1beta1.ts index 0ef05758dbc..09a9e12b8df 100644 --- a/src/apis/iap/v1beta1.ts +++ b/src/apis/iap/v1beta1.ts @@ -277,10 +277,12 @@ export namespace iap_v1beta1 { export class Resource$Projects { root: Iap; + iap_tunnel: Resource$Projects$Iap_tunnel; iap_web: Resource$Projects$Iap_web; constructor(root: Iap) { this.root = root; this.getRoot.bind(this); + this.iap_tunnel = new Resource$Projects$Iap_tunnel(root); this.iap_web = new Resource$Projects$Iap_web(root); } @@ -290,6 +292,884 @@ export namespace iap_v1beta1 { } + export class Resource$Projects$Iap_tunnel { + root: Iap; + zones: Resource$Projects$Iap_tunnel$Zones; + constructor(root: Iap) { + this.root = root; + this.getRoot.bind(this); + this.zones = new Resource$Projects$Iap_tunnel$Zones(root); + } + + getRoot() { + return this.root; + } + + + /** + * iap.projects.iap_tunnel.getIamPolicy + * @desc Gets the access control policy for an Identity-Aware Proxy + * protected resource. More information about managing access via IAP can be + * found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_tunnel.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + * @param {().GetIamPolicyRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getIamPolicy( + params?: Params$Resource$Projects$Iap_tunnel$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Iap_tunnel$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Projects$Iap_tunnel$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: Params$Resource$Projects$Iap_tunnel$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_tunnel$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Iap_tunnel$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * iap.projects.iap_tunnel.setIamPolicy + * @desc Sets the access control policy for an Identity-Aware Proxy + * protected resource. Replaces any existing policy. More information about + * managing access via IAP can be found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_tunnel.setIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * @param {().SetIamPolicyRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + setIamPolicy( + params?: Params$Resource$Projects$Iap_tunnel$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Iap_tunnel$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Projects$Iap_tunnel$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: Params$Resource$Projects$Iap_tunnel$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_tunnel$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Iap_tunnel$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * iap.projects.iap_tunnel.testIamPermissions + * @desc Returns permissions that a caller has on the Identity-Aware Proxy + * protected resource. If the resource does not exist or the caller does not + * have Identity-Aware Proxy permissions a + * [google.rpc.Code.PERMISSION_DENIED] will be returned. More information + * about managing access via IAP can be found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_tunnel.testIamPermissions + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * @param {().TestIamPermissionsRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + testIamPermissions( + params?: Params$Resource$Projects$Iap_tunnel$Testiampermissions, + options?: MethodOptions): + AxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Iap_tunnel$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + testIamPermissions( + params: Params$Resource$Projects$Iap_tunnel$Testiampermissions, + callback: BodyResponseCallback): + void; + testIamPermissions( + callback: BodyResponseCallback): + void; + testIamPermissions( + paramsOrCallback?: + Params$Resource$Projects$Iap_tunnel$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_tunnel$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Iap_tunnel$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Iap_tunnel$Getiampolicy { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy is being requested. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GetIamPolicyRequest; + } + export interface Params$Resource$Projects$Iap_tunnel$Setiampolicy { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy is being specified. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Iap_tunnel$Testiampermissions { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + + export class Resource$Projects$Iap_tunnel$Zones { + root: Iap; + instances: Resource$Projects$Iap_tunnel$Zones$Instances; + constructor(root: Iap) { + this.root = root; + this.getRoot.bind(this); + this.instances = new Resource$Projects$Iap_tunnel$Zones$Instances(root); + } + + getRoot() { + return this.root; + } + + + /** + * iap.projects.iap_tunnel.zones.getIamPolicy + * @desc Gets the access control policy for an Identity-Aware Proxy + * protected resource. More information about managing access via IAP can be + * found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_tunnel.zones.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + * @param {().GetIamPolicyRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getIamPolicy( + params?: Params$Resource$Projects$Iap_tunnel$Zones$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Iap_tunnel$Zones$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: Params$Resource$Projects$Iap_tunnel$Zones$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + Params$Resource$Projects$Iap_tunnel$Zones$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_tunnel$Zones$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Iap_tunnel$Zones$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * iap.projects.iap_tunnel.zones.setIamPolicy + * @desc Sets the access control policy for an Identity-Aware Proxy + * protected resource. Replaces any existing policy. More information about + * managing access via IAP can be found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_tunnel.zones.setIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * @param {().SetIamPolicyRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + setIamPolicy( + params?: Params$Resource$Projects$Iap_tunnel$Zones$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Iap_tunnel$Zones$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: Params$Resource$Projects$Iap_tunnel$Zones$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + Params$Resource$Projects$Iap_tunnel$Zones$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_tunnel$Zones$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Iap_tunnel$Zones$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * iap.projects.iap_tunnel.zones.testIamPermissions + * @desc Returns permissions that a caller has on the Identity-Aware Proxy + * protected resource. If the resource does not exist or the caller does not + * have Identity-Aware Proxy permissions a + * [google.rpc.Code.PERMISSION_DENIED] will be returned. More information + * about managing access via IAP can be found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_tunnel.zones.testIamPermissions + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * @param {().TestIamPermissionsRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + testIamPermissions( + params?: Params$Resource$Projects$Iap_tunnel$Zones$Testiampermissions, + options?: MethodOptions): + AxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Iap_tunnel$Zones$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + testIamPermissions( + params: Params$Resource$Projects$Iap_tunnel$Zones$Testiampermissions, + callback: BodyResponseCallback): + void; + testIamPermissions( + callback: BodyResponseCallback): + void; + testIamPermissions( + paramsOrCallback?: + Params$Resource$Projects$Iap_tunnel$Zones$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_tunnel$Zones$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Iap_tunnel$Zones$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Iap_tunnel$Zones$Getiampolicy { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy is being requested. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GetIamPolicyRequest; + } + export interface Params$Resource$Projects$Iap_tunnel$Zones$Setiampolicy { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy is being specified. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Iap_tunnel$Zones$Testiampermissions { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + + export class Resource$Projects$Iap_tunnel$Zones$Instances { + root: Iap; + constructor(root: Iap) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * iap.projects.iap_tunnel.zones.instances.getIamPolicy + * @desc Gets the access control policy for an Identity-Aware Proxy + * protected resource. More information about managing access via IAP can be + * found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_tunnel.zones.instances.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + * @param {().GetIamPolicyRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getIamPolicy( + params?: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Getiampolicy, + options?: MethodOptions): AxiosPromise; + getIamPolicy( + params: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Getiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getIamPolicy( + params: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Getiampolicy, + callback: BodyResponseCallback): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Getiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:getIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * iap.projects.iap_tunnel.zones.instances.setIamPolicy + * @desc Sets the access control policy for an Identity-Aware Proxy + * protected resource. Replaces any existing policy. More information about + * managing access via IAP can be found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_tunnel.zones.instances.setIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * @param {().SetIamPolicyRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + setIamPolicy( + params?: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Setiampolicy, + options?: MethodOptions): AxiosPromise; + setIamPolicy( + params: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Setiampolicy, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + setIamPolicy( + params: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Setiampolicy, + callback: BodyResponseCallback): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Setiampolicy| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:setIamPolicy') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * iap.projects.iap_tunnel.zones.instances.testIamPermissions + * @desc Returns permissions that a caller has on the Identity-Aware Proxy + * protected resource. If the resource does not exist or the caller does not + * have Identity-Aware Proxy permissions a + * [google.rpc.Code.PERMISSION_DENIED] will be returned. More information + * about managing access via IAP can be found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @alias iap.projects.iap_tunnel.zones.instances.testIamPermissions + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * @param {().TestIamPermissionsRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + testIamPermissions( + params?: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Testiampermissions, + options?: MethodOptions): + AxiosPromise; + testIamPermissions( + params: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Testiampermissions, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + testIamPermissions( + params: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Testiampermissions, + callback: BodyResponseCallback): + void; + testIamPermissions( + callback: BodyResponseCallback): + void; + testIamPermissions( + paramsOrCallback?: + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Testiampermissions| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Iap_tunnel$Zones$Instances$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://iap.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:testIamPermissions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Iap_tunnel$Zones$Instances$Getiampolicy { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy is being requested. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GetIamPolicyRequest; + } + export interface Params$Resource$Projects$Iap_tunnel$Zones$Instances$Setiampolicy { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy is being specified. See the + * operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Iap_tunnel$Zones$Instances$Testiampermissions { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + + + export class Resource$Projects$Iap_web { root: Iap; services: Resource$Projects$Iap_web$Services; diff --git a/src/apis/index.ts b/src/apis/index.ts index f013577d91e..0685491f887 100644 --- a/src/apis/index.ts +++ b/src/apis/index.ts @@ -19,7 +19,6 @@ import * as abusiveexperiencereport from './abusiveexperiencereport'; import * as acceleratedmobilepageurl from './acceleratedmobilepageurl'; import * as adexchangebuyer from './adexchangebuyer'; import * as adexchangebuyer2 from './adexchangebuyer2'; -import * as adexchangeseller from './adexchangeseller'; import * as adexperiencereport from './adexperiencereport'; import * as admin from './admin'; import * as adsense from './adsense'; @@ -72,6 +71,7 @@ import * as dns from './dns'; import * as doubleclickbidmanager from './doubleclickbidmanager'; import * as doubleclicksearch from './doubleclicksearch'; import * as drive from './drive'; +import * as file from './file'; import * as firebasedynamiclinks from './firebasedynamiclinks'; import * as firebaserules from './firebaserules'; import * as firestore from './firestore'; @@ -162,7 +162,6 @@ export const APIS: APIList = { acceleratedmobilepageurl: acceleratedmobilepageurl.VERSIONS, adexchangebuyer: adexchangebuyer.VERSIONS, adexchangebuyer2: adexchangebuyer2.VERSIONS, - adexchangeseller: adexchangeseller.VERSIONS, adexperiencereport: adexperiencereport.VERSIONS, admin: admin.VERSIONS, adsense: adsense.VERSIONS, @@ -215,6 +214,7 @@ export const APIS: APIList = { doubleclickbidmanager: doubleclickbidmanager.VERSIONS, doubleclicksearch: doubleclicksearch.VERSIONS, drive: drive.VERSIONS, + file: file.VERSIONS, firebasedynamiclinks: firebasedynamiclinks.VERSIONS, firebaserules: firebaserules.VERSIONS, firestore: firestore.VERSIONS, @@ -301,7 +301,6 @@ export class GeneratedAPIs { acceleratedmobilepageurl = acceleratedmobilepageurl.acceleratedmobilepageurl; adexchangebuyer = adexchangebuyer.adexchangebuyer; adexchangebuyer2 = adexchangebuyer2.adexchangebuyer2; - adexchangeseller = adexchangeseller.adexchangeseller; adexperiencereport = adexperiencereport.adexperiencereport; admin = admin.admin; adsense = adsense.adsense; @@ -355,6 +354,7 @@ export class GeneratedAPIs { doubleclickbidmanager = doubleclickbidmanager.doubleclickbidmanager; doubleclicksearch = doubleclicksearch.doubleclicksearch; drive = drive.drive; + file = file.file; firebasedynamiclinks = firebasedynamiclinks.firebasedynamiclinks; firebaserules = firebaserules.firebaserules; firestore = firestore.firestore; @@ -440,7 +440,6 @@ export class GeneratedAPIs { this.acceleratedmobilepageurl = this.acceleratedmobilepageurl.bind(this); this.adexchangebuyer = this.adexchangebuyer.bind(this); this.adexchangebuyer2 = this.adexchangebuyer2.bind(this); - this.adexchangeseller = this.adexchangeseller.bind(this); this.adexperiencereport = this.adexperiencereport.bind(this); this.admin = this.admin.bind(this); this.adsense = this.adsense.bind(this); @@ -493,6 +492,7 @@ export class GeneratedAPIs { this.doubleclickbidmanager = this.doubleclickbidmanager.bind(this); this.doubleclicksearch = this.doubleclicksearch.bind(this); this.drive = this.drive.bind(this); + this.file = this.file.bind(this); this.firebasedynamiclinks = this.firebasedynamiclinks.bind(this); this.firebaserules = this.firebaserules.bind(this); this.firestore = this.firestore.bind(this); diff --git a/src/apis/jobs/index.ts b/src/apis/jobs/index.ts index d5db6b96cec..6a228ba8105 100644 --- a/src/apis/jobs/index.ts +++ b/src/apis/jobs/index.ts @@ -16,18 +16,23 @@ import {getAPI, GoogleConfigurable} from 'googleapis-common'; import {jobs_v2} from './v2'; import {jobs_v3} from './v3'; +import {jobs_v3p1beta1} from './v3p1beta1'; export const VERSIONS = { 'v2': jobs_v2.Jobs, 'v3': jobs_v3.Jobs, + 'v3p1beta1': jobs_v3p1beta1.Jobs, }; export function jobs(version: 'v2'): jobs_v2.Jobs; export function jobs(options: jobs_v2.Options): jobs_v2.Jobs; export function jobs(version: 'v3'): jobs_v3.Jobs; export function jobs(options: jobs_v3.Options): jobs_v3.Jobs; -export function jobs( +export function jobs(version: 'v3p1beta1'): jobs_v3p1beta1.Jobs; +export function jobs(options: jobs_v3p1beta1.Options): jobs_v3p1beta1.Jobs; +export function jobs( this: GoogleConfigurable, - versionOrOptions: 'v2'|jobs_v2.Options|'v3'|jobs_v3.Options) { + versionOrOptions: 'v2'|jobs_v2.Options|'v3'| + jobs_v3.Options|'v3p1beta1'|jobs_v3p1beta1.Options) { return getAPI('jobs', versionOrOptions, VERSIONS, this); } diff --git a/src/apis/jobs/v2.ts b/src/apis/jobs/v2.ts index a786888b20c..0fefdf342df 100644 --- a/src/apis/jobs/v2.ts +++ b/src/apis/jobs/v2.ts @@ -451,11 +451,15 @@ export namespace jobs_v2 { */ export interface Schema$CompensationRange { /** - * Required. The maximum amount of compensation. + * Optional. The maximum amount of compensation. If left empty, the value + * is set to a maximal compensation value and the currency code is set to + * match the currency code of min_compensation. */ max?: Schema$Money; /** - * Required. The minimum amount of compensation. + * Optional. The minimum amount of compensation. If left empty, the value + * is set to zero and the currency code is set to match the currency code of + * max_compensation. */ min?: Schema$Money; } @@ -604,12 +608,12 @@ export namespace jobs_v2 { type?: string; } /** - * Represents a whole calendar date, e.g. date of birth. The time of day and - * time zone are either specified elsewhere or are not significant. The date - * is relative to the Proleptic Gregorian Calendar. The day may be 0 to - * represent a year and month where the day is not significant, e.g. credit - * card expiration date. The year may be 0 to represent a month and day - * independent of year, e.g. anniversary date. Related types are + * Represents a whole calendar date, for example date of birth. The time of + * day and time zone are either specified elsewhere or are not significant. + * The date is relative to the Proleptic Gregorian Calendar. The day can be 0 + * to represent a year and month where the day is not significant, for example + * credit card expiration date. The year can be 0 to represent a month and day + * independent of year, for example anniversary date. Related types are * google.type.TimeOfDay and `google.protobuf.Timestamp`. */ export interface Schema$Date { @@ -2057,7 +2061,7 @@ export namespace jobs_v2 { */ estimatedTotalSize?: string; /** - * The histogram results that match with specified + * The histogram results that match specified * SearchJobsRequest.HistogramFacets. */ histogramResults?: Schema$HistogramResults; diff --git a/src/apis/jobs/v3.ts b/src/apis/jobs/v3.ts index ceb5da86006..a0e7e0c8a04 100644 --- a/src/apis/jobs/v3.ts +++ b/src/apis/jobs/v3.ts @@ -401,11 +401,15 @@ export namespace jobs_v3 { */ export interface Schema$CompensationRange { /** - * Required. The maximum amount of compensation. + * Optional. The maximum amount of compensation. If left empty, the value + * is set to a maximal compensation value and the currency code is set to + * match the currency code of min_compensation. */ maxCompensation?: Schema$Money; /** - * Required. The minimum amount of compensation. + * Optional. The minimum amount of compensation. If left empty, the value + * is set to zero and the currency code is set to match the currency code of + * max_compensation. */ minCompensation?: Schema$Money; } @@ -568,9 +572,8 @@ export namespace jobs_v3 { */ customAttributeHistogramFacets?: Schema$CustomAttributeHistogramRequest[]; /** - * Optional. Specifies the simple type of histogram facets, for example, - * `COMPANY_SIZE`, `EMPLOYMENT_TYPE` etc. This field is equivalent to - * GetHistogramRequest. + * Optional. Specifies the simple type of histogram facets, for example, + * `COMPANY_SIZE`, `EMPLOYMENT_TYPE` etc. */ simpleHistogramFacets?: string[]; } @@ -1428,28 +1431,26 @@ export namespace jobs_v3 { offset?: number; /** * Optional. The criteria determining how search results are sorted. - * Default is "relevance desc". Supported options are: * + * Default is "relevance desc". Supported options are: * * "relevance desc": By relevance descending, as determined by the - * API algorithms. Relevance thresholding of query results is only - * available with this ordering. * "posting_publish_time - * desc": By Job.posting_publish_time descending. * - * "posting_update_time desc": By Job.posting_update_time - * descending. * "title": By Job.title ascending. * - * "title desc": By Job.title descending. * - * "annualized_base_compensation": By job's - * CompensationInfo.annualized_base_compensation ascending. If job's - * annualized base compensation is unspecified, they are put at the end of - * search result. * "annualized_base_compensation desc": By - * job's CompensationInfo.annualized_base_compensation descending. - * If job's annualized base compensation is unspecified, they are - * put at the end of search result. * - * "annualized_total_compensation": By job's - * CompensationInfo.annualized_total_compensation ascending. If job's - * annualized total compensation is unspecified, they are put at the end of - * search result. * "annualized_total_compensation desc": By - * job's CompensationInfo.annualized_total_compensation descending. - * If job's annualized total compensation is unspecified, they are - * put at the end of search result. + * API algorithms. Relevance thresholding of query results is only available + * with this ordering. * "posting_publish_time desc": By + * Job.posting_publish_time descending. * "posting_update_time + * desc": By Job.posting_update_time descending. * "title": + * By Job.title ascending. * "title desc": By Job.title + * descending. * "annualized_base_compensation": By job's + * CompensationInfo.annualized_base_compensation_range ascending. Jobs whose + * annualized base compensation is unspecified are put at the end of search + * results. * "annualized_base_compensation desc": By job's + * CompensationInfo.annualized_base_compensation_range descending. Jobs + * whose annualized base compensation is unspecified are put at the end of + * search results. * "annualized_total_compensation": By job's + * CompensationInfo.annualized_total_compensation_range ascending. Jobs + * whose annualized base compensation is unspecified are put at the end of + * search results. * "annualized_total_compensation desc": By + * job's CompensationInfo.annualized_total_compensation_range + * descending. Jobs whose annualized base compensation is unspecified are + * put at the end of search results. */ orderBy?: string; /** @@ -1506,7 +1507,7 @@ export namespace jobs_v3 { */ estimatedTotalSize?: number; /** - * The histogram results that match with specified + * The histogram results that match specified * SearchJobsRequest.histogram_facets. */ histogramResults?: Schema$HistogramResults; diff --git a/src/apis/jobs/v3p1beta1.ts b/src/apis/jobs/v3p1beta1.ts new file mode 100644 index 00000000000..b5d63ad46d5 --- /dev/null +++ b/src/apis/jobs/v3p1beta1.ts @@ -0,0 +1,3246 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {AxiosPromise} from 'axios'; +import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; +import {BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace jobs_v3p1beta1 { + export interface Options extends GlobalOptions { + version: 'v3p1beta1'; + } + + /** + * Cloud Talent Solution API + * + * Cloud Talent Solution provides the capability to create, read, update, and + * delete job postings, as well as search jobs based on keywords and filters. + * + * @example + * const {google} = require('googleapis'); + * const jobs = google.jobs('v3p1beta1'); + * + * @namespace jobs + * @type {Function} + * @version v3p1beta1 + * @variation v3p1beta1 + * @param {object=} options Options for Jobs + */ + export class Jobs { + _options: GlobalOptions; + google?: GoogleConfigurable; + root = this; + + projects: Resource$Projects; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this._options = options || {}; + this.google = google; + this.getRoot.bind(this); + + this.projects = new Resource$Projects(this); + } + + getRoot() { + return this.root; + } + } + + /** + * Application related details of a job posting. + */ + export interface Schema$ApplicationInfo { + /** + * Optional but at least one of uris, emails or instruction must be + * specified. Use this field to specify email address(es) to which resumes + * or applications can be sent. The maximum number of allowed characters + * for each entry is 255. + */ + emails?: string[]; + /** + * Optional but at least one of uris, emails or instruction must be + * specified. Use this field to provide instructions, such as "Mail + * your application to ...", that a candidate can follow to apply for + * the job. This field accepts and sanitizes HTML input, and also accepts + * bold, italic, ordered list, and unordered list markup tags. The maximum + * number of allowed characters is 3,000. + */ + instruction?: string; + /** + * Optional but at least one of uris, emails or instruction must be + * specified. Use this URI field to direct an applicant to a website, for + * example to link to an online application form. The maximum number of + * allowed characters for each entry is 2,000. + */ + uris?: string[]; + } + /** + * Input only. Batch delete jobs request. + */ + export interface Schema$BatchDeleteJobsRequest { + /** + * Required. The filter string specifies the jobs to be deleted. Supported + * operator: =, AND The fields eligible for filtering are: * `companyName` + * (Required) * `requisitionId` (Required) Sample Query: companyName = + * "projects/api-test-project/companies/123" AND requisitionId = + * "req-1" + */ + filter?: string; + } + /** + * Represents count of jobs within one bucket. + */ + export interface Schema$BucketizedCount { + /** + * Number of jobs whose numeric field value fall into `range`. + */ + count?: number; + /** + * Bucket range on which histogram was performed for the numeric field, that + * is, the count represents number of jobs in this range. + */ + range?: Schema$BucketRange; + } + /** + * Represents starting and ending value of a range in double. + */ + export interface Schema$BucketRange { + /** + * Starting value of the bucket range. + */ + from?: number; + /** + * Ending value of the bucket range. + */ + to?: number; + } + /** + * An event issued when an end user interacts with the application that + * implements Cloud Talent Solution. Providing this information improves the + * quality of search and recommendation for the API clients, enabling the + * service to perform optimally. The number of events sent must be consistent + * with other calls, such as job searches, issued to the service by the + * client. + */ + export interface Schema$ClientEvent { + /** + * Required. The timestamp of the event. + */ + createTime?: string; + /** + * Required. A unique identifier, generated by the client application. This + * `event_id` is used to establish the relationship between different events + * (see parent_event_id). + */ + eventId?: string; + /** + * Optional. Extra information about this event. Used for storing + * information with no matching field in event payload, for example, user + * application specific context or details. At most 20 keys are supported. + * The maximum total size of all keys and values is 2 KB. + */ + extraInfo?: any; + /** + * A event issued when a job seeker interacts with the application that + * implements Cloud Talent Solution. + */ + jobEvent?: Schema$JobEvent; + /** + * Required except the first event. The event_id of an event that resulted + * in the current event. For example, a Job view event usually follows a + * parent impression event: A job seeker first does a search where a list of + * jobs appears (impression). The job seeker then selects a result and views + * the description of a particular job (Job view). + */ + parentEventId?: string; + /** + * Required. A unique ID generated in the API responses. It can be found in + * ResponseMetadata.request_id. + */ + requestId?: string; + } + /** + * Input only. Parameters needed for commute search. + */ + export interface Schema$CommuteFilter { + /** + * Optional. If `true`, jobs without street level addresses may also be + * returned. For city level addresses, the city center is used. For state + * and coarser level addresses, text matching is used. If this field is set + * to `false` or is not specified, only jobs that include street level + * addresses will be returned by commute search. + */ + allowImpreciseAddresses?: boolean; + /** + * Required. The method of transportation for which to calculate the + * commute time. + */ + commuteMethod?: string; + /** + * Optional. The departure time used to calculate traffic impact, + * represented as .google.type.TimeOfDay in local time zone. Currently + * traffic model is restricted to hour level resolution. + */ + departureTime?: Schema$TimeOfDay; + /** + * Optional. Specifies the traffic density to use when caculating commute + * time. + */ + roadTraffic?: string; + /** + * Required. The latitude and longitude of the location from which to + * calculate the commute time. + */ + startCoordinates?: Schema$LatLng; + /** + * Required. The maximum travel time in seconds. The maximum allowed value + * is `3600s` (one hour). Format is `123s`. + */ + travelDuration?: string; + } + /** + * Output only. Commute details related to this job. + */ + export interface Schema$CommuteInfo { + /** + * Location used as the destination in the commute calculation. + */ + jobLocation?: Schema$Location; + /** + * The number of seconds required to travel to the job location from the + * query location. A duration of 0 seconds indicates that the job is not + * reachable within the requested duration, but was returned as part of an + * expanded query. + */ + travelDuration?: string; + } + /** + * A Company resource represents a company in the service. A company is the + * entity that owns job postings, that is, the hiring entity responsible for + * employing applicants for the job position. + */ + export interface Schema$Company { + /** + * Optional. The URI to employer's career site or careers page on the + * employer's web site, for example, + * "https://careers.google.com". + */ + careerSiteUri?: string; + /** + * Output only. Derived details about the company. + */ + derivedInfo?: Schema$CompanyDerivedInfo; + /** + * Required. The display name of the company, for example, "Google, + * LLC". + */ + displayName?: string; + /** + * Optional. Equal Employment Opportunity legal disclaimer text to be + * associated with all jobs, and typically to be displayed in all roles. The + * maximum number of allowed characters is 500. + */ + eeoText?: string; + /** + * Required. Client side company identifier, used to uniquely identify the + * company. The maximum number of allowed characters is 255. + */ + externalId?: string; + /** + * Optional. The street address of the company's main headquarters, + * which may be different from the job location. The service attempts to + * geolocate the provided address, and populates a more specific location + * wherever possible in DerivedInfo.headquarters_location. + */ + headquartersAddress?: string; + /** + * Optional. Set to true if it is the hiring agency that post jobs for + * other employers. Defaults to false if not provided. + */ + hiringAgency?: boolean; + /** + * Optional. A URI that hosts the employer's company logo. + */ + imageUri?: string; + /** + * Optional. A list of keys of filterable Job.custom_attributes, whose + * corresponding `string_values` are used in keyword search. Jobs with + * `string_values` under these specified field keys are returned if any of + * the values matches the search keyword. Custom field values with + * parenthesis, brackets and special symbols won't be properly + * searchable, and those keyword queries need to be surrounded by quotes. + */ + keywordSearchableJobCustomAttributes?: string[]; + /** + * Required during company update. The resource name for a company. This is + * generated by the service when a company is created. The format is + * "projects/{project_id}/companies/{company_id}", for example, + * "projects/api-test-project/companies/foo". + */ + name?: string; + /** + * Optional. The employer's company size. + */ + size?: string; + /** + * Output only. Indicates whether a company is flagged to be suspended from + * public availability by the service when job content appears suspicious, + * abusive, or spammy. + */ + suspended?: boolean; + /** + * Optional. The URI representing the company's primary web site or + * home page, for example, "https://www.google.com". The maximum + * number of allowed characters is 255. + */ + websiteUri?: string; + } + /** + * Derived details about the company. + */ + export interface Schema$CompanyDerivedInfo { + /** + * A structured headquarters location of the company, resolved from + * Company.hq_location if provided. + */ + headquartersLocation?: Schema$Location; + } + /** + * A compensation entry that represents one component of compensation, such as + * base pay, bonus, or other compensation type. Annualization: One + * compensation entry can be annualized if - it contains valid amount or + * range. - and its expected_units_per_year is set or can be derived. Its + * annualized range is determined as (amount or range) times + * expected_units_per_year. + */ + export interface Schema$CompensationEntry { + /** + * Optional. Compensation amount. + */ + amount?: Schema$Money; + /** + * Optional. Compensation description. For example, could indicate equity + * terms or provide additional context to an estimated bonus. + */ + description?: string; + /** + * Optional. Expected number of units paid each year. If not specified, + * when Job.employment_types is FULLTIME, a default value is inferred based + * on unit. Default values: - HOURLY: 2080 - DAILY: 260 - WEEKLY: 52 - + * MONTHLY: 12 - ANNUAL: 1 + */ + expectedUnitsPerYear?: number; + /** + * Optional. Compensation range. + */ + range?: Schema$CompensationRange; + /** + * Optional. Compensation type. Default is + * CompensationUnit.OTHER_COMPENSATION_TYPE. + */ + type?: string; + /** + * Optional. Frequency of the specified amount. Default is + * CompensationUnit.OTHER_COMPENSATION_UNIT. + */ + unit?: string; + } + /** + * Input only. Filter on job compensation type and amount. + */ + export interface Schema$CompensationFilter { + /** + * Optional. Whether to include jobs whose compensation range is + * unspecified. + */ + includeJobsWithUnspecifiedCompensationRange?: boolean; + /** + * Optional. Compensation range. + */ + range?: Schema$CompensationRange; + /** + * Required. Type of filter. + */ + type?: string; + /** + * Required. Specify desired `base compensation entry's` + * CompensationInfo.CompensationUnit. + */ + units?: string[]; + } + /** + * Input only. Compensation based histogram request. + */ + export interface Schema$CompensationHistogramRequest { + /** + * Required. Numeric histogram options, like buckets, whether include min + * or max value. + */ + bucketingOption?: Schema$NumericBucketingOption; + /** + * Required. Type of the request, representing which field the + * histogramming should be performed over. A single request can only specify + * one histogram of each `CompensationHistogramRequestType`. + */ + type?: string; + } + /** + * Output only. Compensation based histogram result. + */ + export interface Schema$CompensationHistogramResult { + /** + * Histogram result. + */ + result?: Schema$NumericBucketingResult; + /** + * Type of the request, corresponding to CompensationHistogramRequest.type. + */ + type?: string; + } + /** + * Job compensation details. + */ + export interface Schema$CompensationInfo { + /** + * Output only. Annualized base compensation range. Computed as base + * compensation entry's CompensationEntry.compensation times + * CompensationEntry.expected_units_per_year. See CompensationEntry for + * explanation on compensation annualization. + */ + annualizedBaseCompensationRange?: Schema$CompensationRange; + /** + * Output only. Annualized total compensation range. Computed as all + * compensation entries' CompensationEntry.compensation times + * CompensationEntry.expected_units_per_year. See CompensationEntry for + * explanation on compensation annualization. + */ + annualizedTotalCompensationRange?: Schema$CompensationRange; + /** + * Optional. Job compensation information. At most one entry can be of + * type CompensationInfo.CompensationType.BASE, which is referred as ** base + * compensation entry ** for the job. + */ + entries?: Schema$CompensationEntry[]; + } + /** + * Compensation range. + */ + export interface Schema$CompensationRange { + /** + * Optional. The maximum amount of compensation. If left empty, the value + * is set to a maximal compensation value and the currency code is set to + * match the currency code of min_compensation. + */ + maxCompensation?: Schema$Money; + /** + * Optional. The minimum amount of compensation. If left empty, the value + * is set to zero and the currency code is set to match the currency code of + * max_compensation. + */ + minCompensation?: Schema$Money; + } + /** + * Output only. Response of auto-complete query. + */ + export interface Schema$CompleteQueryResponse { + /** + * Results of the matching job/company candidates. + */ + completionResults?: Schema$CompletionResult[]; + /** + * Additional information for the API invocation, such as the request + * tracking id. + */ + metadata?: Schema$ResponseMetadata; + } + /** + * Output only. Resource that represents completion results. + */ + export interface Schema$CompletionResult { + /** + * The URI of the company image for CompletionType.COMPANY_NAME. + */ + imageUri?: string; + /** + * The suggestion for the query. + */ + suggestion?: string; + /** + * The completion topic. + */ + type?: string; + } + /** + * The report event request. + */ + export interface Schema$CreateClientEventRequest { + /** + * Required. Events issued when end user interacts with customer's + * application that uses Cloud Talent Solution. + */ + clientEvent?: Schema$ClientEvent; + } + /** + * Input only. The Request of the CreateCompany method. + */ + export interface Schema$CreateCompanyRequest { + /** + * Required. The company to be created. + */ + company?: Schema$Company; + } + /** + * Input only. Create job request. + */ + export interface Schema$CreateJobRequest { + /** + * Required. The Job to be created. + */ + job?: Schema$Job; + } + /** + * Custom attribute values that are either filterable or non-filterable. + */ + export interface Schema$CustomAttribute { + /** + * Optional. If the `filterable` flag is true, custom field values are + * searchable. If false, values are not searchable. Default is false. + */ + filterable?: boolean; + /** + * Optional but exactly one of string_values or long_values must be + * specified. This field is used to perform number range search. (`EQ`, + * `GT`, `GE`, `LE`, `LT`) over filterable `long_value`. Currently at most + * 1 long_values is supported. + */ + longValues?: string[]; + /** + * Optional but exactly one of string_values or long_values must be + * specified. This field is used to perform a string match + * (`CASE_SENSITIVE_MATCH` or `CASE_INSENSITIVE_MATCH`) search. For + * filterable `string_value`s, a maximum total number of 200 values is + * allowed, with each `string_value` has a byte size of no more than 255B. + * For unfilterable `string_values`, the maximum total byte size of + * unfilterable `string_values` is 50KB. Empty string is not allowed. + */ + stringValues?: string[]; + } + /** + * Custom attributes histogram request. An error is thrown if neither + * string_value_histogram or long_value_histogram_bucketing_option has been + * defined. + */ + export interface Schema$CustomAttributeHistogramRequest { + /** + * Required. Specifies the custom field key to perform a histogram on. If + * specified without `long_value_histogram_bucketing_option`, histogram on + * string values of the given `key` is triggered, otherwise histogram is + * performed on long values. + */ + key?: string; + /** + * Optional. Specifies buckets used to perform a range histogram on + * Job's filterable long custom field values, or min/max value + * requirements. + */ + longValueHistogramBucketingOption?: Schema$NumericBucketingOption; + /** + * Optional. If set to true, the response includes the histogram value for + * each key as a string. + */ + stringValueHistogram?: boolean; + } + /** + * Output only. Custom attribute histogram result. + */ + export interface Schema$CustomAttributeHistogramResult { + /** + * Stores the key of custom attribute the histogram is performed on. + */ + key?: string; + /** + * Stores bucketed histogram counting result or min/max values for custom + * attribute long values associated with `key`. + */ + longValueHistogramResult?: Schema$NumericBucketingResult; + /** + * Stores a map from the values of string custom field associated with `key` + * to the number of jobs with that value in this histogram result. + */ + stringValueHistogramResult?: any; + } + /** + * Input only. Custom ranking information for SearchJobsRequest. + */ + export interface Schema$CustomRankingInfo { + /** + * Required. Controls over how important the score of + * CustomRankingInfo.ranking_expression gets applied to job's final + * ranking position. An error will be thrown if not specified. + */ + importanceLevel?: string; + /** + * Required. Controls over how job documents get ranked on top of existing + * relevance score (determined by API algorithm). The product of ranking + * expression and relevance score is used to determine job's final + * ranking position. The syntax for this expression is a subset of Google + * SQL syntax. Supported operators are: +, -, *, /, where the left and + * right side of the operator is either a numeric Job.custom_attributes key, + * integer/double value or an expression that can be evaluated to a number. + * Parenthesis are supported to adjust calculation precedence. The + * expression must be < 100 characters in length. Sample ranking + * expression (year + 25) * 0.25 - (freshness / 0.5) + */ + rankingExpression?: string; + } + /** + * Device information collected from the job seeker, candidate, or other + * entity conducting the job search. Providing this information improves the + * quality of the search results across devices. + */ + export interface Schema$DeviceInfo { + /** + * Optional. Type of the device. + */ + deviceType?: string; + /** + * Optional. A device-specific ID. The ID must be a unique identifier that + * distinguishes the device from other devices. + */ + id?: string; + } + /** + * A generic empty message that you can re-use to avoid defining duplicated + * empty messages in your APIs. A typical example is to use it as the request + * or the response type of an API method. For instance: service Foo { rpc + * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON + * representation for `Empty` is empty JSON object `{}`. + */ + export interface Schema$Empty {} + /** + * Input only. Histogram facets to be specified in SearchJobsRequest. + */ + export interface Schema$HistogramFacets { + /** + * Optional. Specifies compensation field-based histogram requests. + * Duplicate values of CompensationHistogramRequest.type are not allowed. + */ + compensationHistogramFacets?: Schema$CompensationHistogramRequest[]; + /** + * Optional. Specifies the custom attributes histogram requests. Duplicate + * values of CustomAttributeHistogramRequest.key are not allowed. + */ + customAttributeHistogramFacets?: Schema$CustomAttributeHistogramRequest[]; + /** + * Optional. Specifies the simple type of histogram facets, for example, + * `COMPANY_SIZE`, `EMPLOYMENT_TYPE` etc. + */ + simpleHistogramFacets?: string[]; + } + /** + * Input Only. The histogram request. + */ + export interface Schema$HistogramQuery { + /** + * An expression specifies a histogram request against matching resources + * (for example, jobs) for searches. Expression syntax is a aggregation + * function call with histogram facets and other options. Available + * aggregation function calls are: * `count(string_histogram_facet)`: Count + * the number of matching entity, for each distinct attribute value. * + * `count(numeric_histogram_facet, list of buckets)`: Count the number of + * matching entity within each bucket. Data types: * Histogram facet: + * facet names with format a-zA-Z+. * String: string like "any string + * with backslash escape for quote(\")." * Number: whole number + * and floating point number like 10, -1 and -0.01. * List: list of elements + * with comma(,) separator surrounded by square brackets. For example, [1, + * 2, 3] and ["one", "two", "three"]. Built-in + * constants: * MIN (minimum number similar to java Double.MIN_VALUE) * MAX + * (maximum number similar to java Double.MAX_VALUE) Built-in functions: * + * bucket(start, end[, label]): bucket built-in function creates a bucket + * with range of start, end). Note that the end is exclusive. For example, + * bucket(1, MAX, "positive number") or bucket(1, 10). Job + * histogram facets: * company_id: histogram by + * [Job.distributor_company_id. * company_display_name: histogram by + * Job.company_display_name. * employment_type: histogram by + * Job.employment_types. For example, "FULL_TIME", + * "PART_TIME". * company_size: histogram by CompanySize, for + * example, "SMALL", "MEDIUM", "BIG". * + * publish_time_in_month: histogram by the Job.publish_time in months. Must + * specify list of numeric buckets in spec. * publish_time_in_year: + * histogram by the Job.publish_time in years. Must specify list of numeric + * buckets in spec. * degree_type: histogram by the Job.degree_type. For + * example, "Bachelors", "Masters". * job_level: + * histogram by the Job.job_level. For example, "Entry Level". * + * country: histogram by the country code of jobs. For example, + * "US", "FR". * admin1: histogram by the admin1 code of + * jobs, which is a global placeholder referring to the state, province, or + * the particular term a country uses to define the geographic structure + * below the country level. For example, "CA", "IL". * + * city: histogram by a combination of the "city name, admin1 + * code". For example, "Mountain View, CA", "New York, + * NY". * admin1_country: histogram by a combination of the + * "admin1 code, country". For example, "CA, US", + * "IL, US". * city_coordinate: histogram by the city center's + * GPS coordinates (latitude and longitude). For + * example, 37.4038522,-122.0987765. Since the coordinates of a city center + * can change, customers may need to refresh them periodically. * locale: + * histogram by the Job.language_code. For example, "en-US", + * "fr-FR". * language: histogram by the language subtag of the + * Job.language_code. For example, "en", "fr". * + * category: histogram by the JobCategory. For example, + * "COMPUTER_AND_IT", "HEALTHCARE". * + * base_compensation_unit: histogram by the CompensationUnit of base salary. + * For example, "WEEKLY", "MONTHLY". * + * base_compensation: histogram by the base salary. Must specify list of + * numeric buckets to group results by. * annualized_base_compensation: + * histogram by the base annualized salary. Must specify list of numeric + * buckets to group results by. * annualized_total_compensation: histogram + * by the total annualized salary. Must specify list of numeric buckets to + * group results by. * string_custom_attribute: histogram by string + * Job.custom_attributes. Values can be accessed via square bracket + * notations like string_custom_attribute["key1"]. * + * numeric_custom_attribute: histogram by numeric Job.custom_attributes. + * Values can be accessed via square bracket notations like + * numeric_custom_attribute["key1"]. Must specify list of numeric + * buckets to group results by. Example expressions: * count(admin1) * + * count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), + * bucket(100000, MAX)]) * + * count(string_custom_attribute["some-string-custom-attribute"]) + * * + * count(numeric_custom_attribute["some-numeric-custom-attribute"], + * [bucket(MIN, 0, "negative"), bucket(0, MAX, + * "non-negative"]) + */ + histogramQuery?: string; + } + /** + * Output only. Histogram result that matches HistogramSpec specified in + * searches. + */ + export interface Schema$HistogramQueryResult { + /** + * A map from the values of the facet associated with distinct values to the + * number of matching entries with corresponding value. The key format is: + * * (for string histogram) string values stored in the field. * (for named + * numeric bucket) name specified in `bucket()` function, like for + * `bucket(0, MAX, "non-negative")`, the key will be + * `non-negative`. * (for anonymous numeric bucket) range formatted as + * `<low>-<high>`, for example, `0-1000`, `MIN-0`, and `0-MAX`. + */ + histogram?: any; + /** + * Requested histogram expression. + */ + histogramQuery?: string; + } + /** + * Output only. Result of a histogram call. The response contains the + * histogram map for the search type specified by HistogramResult.field. The + * response is a map of each filter value to the corresponding count of jobs + * for that filter. + */ + export interface Schema$HistogramResult { + /** + * The Histogram search filters. + */ + searchType?: string; + /** + * A map from the values of field to the number of jobs with that value in + * this search result. Key: search type (filter names, such as the + * companyName). Values: the count of jobs that match the filter for this + * search. + */ + values?: any; + } + /** + * Output only. Histogram results that match HistogramFacets specified in + * SearchJobsRequest. + */ + export interface Schema$HistogramResults { + /** + * Specifies compensation field-based histogram results that match + * HistogramFacets.compensation_histogram_requests. + */ + compensationHistogramResults?: Schema$CompensationHistogramResult[]; + /** + * Specifies histogram results for custom attributes that match + * HistogramFacets.custom_attribute_histogram_facets. + */ + customAttributeHistogramResults?: Schema$CustomAttributeHistogramResult[]; + /** + * Specifies histogram results that matches + * HistogramFacets.simple_histogram_facets. + */ + simpleHistogramResults?: Schema$HistogramResult[]; + } + /** + * A Job resource represents a job posting (also referred to as a "job + * listing" or "job requisition"). A job belongs to a Company, + * which is the hiring entity responsible for the job. + */ + export interface Schema$Job { + /** + * Optional but strongly recommended for the best service experience. + * Location(s) where the employer is looking to hire for this job posting. + * Specifying the full street address(es) of the hiring location enables + * better API results, especially job searches by commute time. At most 50 + * locations are allowed for best search performance. If a job has more + * locations, it is suggested to split it into multiple jobs with unique + * requisition_ids (e.g. 'ReqA' becomes 'ReqA-1', + * 'ReqA-2', etc.) as multiple jobs with the same company_name, + * language_code and requisition_id are not allowed. If the original + * requisition_id must be preserved, a custom field should be used for + * storage. It is also suggested to group the locations that close to each + * other in the same job for better search experience. The maximum number + * of allowed characters is 500. + */ + addresses?: string[]; + /** + * Required. At least one field within ApplicationInfo must be specified. + * Job application information. + */ + applicationInfo?: Schema$ApplicationInfo; + /** + * Output only. Display name of the company listing the job. + */ + companyDisplayName?: string; + /** + * Required. The resource name of the company listing the job, such as + * "projects/api-test-project/companies/foo". + */ + companyName?: string; + /** + * Optional. Job compensation information. + */ + compensationInfo?: Schema$CompensationInfo; + /** + * Optional. A map of fields to hold both filterable and non-filterable + * custom job attributes that are not covered by the provided structured + * fields. The keys of the map are strings up to 64 bytes and must match + * the pattern: a-zA-Z*. For example, key0LikeThis or KEY_1_LIKE_THIS. At + * most 100 filterable and at most 100 unfilterable keys are supported. For + * filterable `string_values`, across all keys at most 200 values are + * allowed, with each string no more than 255 characters. For unfilterable + * `string_values`, the maximum total size of `string_values` across all + * keys is 50KB. + */ + customAttributes?: any; + /** + * Optional. The desired education degrees for the job, such as Bachelors, + * Masters. + */ + degreeTypes?: string[]; + /** + * Optional. The department or functional area within the company with the + * open position. The maximum number of allowed characters is 255. + */ + department?: string; + /** + * Output only. Derived details about the job posting. + */ + derivedInfo?: Schema$JobDerivedInfo; + /** + * Required. The description of the job, which typically includes a + * multi-paragraph description of the company and related information. + * Separate fields are provided on the job object for responsibilities, + * qualifications, and other job characteristics. Use of these separate job + * fields is recommended. This field accepts and sanitizes HTML input, and + * also accepts bold, italic, ordered list, and unordered list markup tags. + * The maximum number of allowed characters is 100,000. + */ + description?: string; + /** + * Optional. The employment type(s) of a job, for example, full time or + * part time. + */ + employmentTypes?: string[]; + /** + * Optional. A description of bonus, commission, and other compensation + * incentives associated with the job not including salary or pay. The + * maximum number of allowed characters is 10,000. + */ + incentives?: string; + /** + * Optional. The benefits included with the job. + */ + jobBenefits?: string[]; + /** + * Optional. The end timestamp of the job. Typically this field is used for + * contracting engagements. Invalid timestamps are ignored. + */ + jobEndTime?: string; + /** + * Optional. The experience level associated with the job, such as + * "Entry Level". + */ + jobLevel?: string; + /** + * Optional. The start timestamp of the job in UTC time zone. Typically + * this field is used for contracting engagements. Invalid timestamps are + * ignored. + */ + jobStartTime?: string; + /** + * Optional. The language of the posting. This field is distinct from any + * requirements for fluency that are associated with the job. Language + * codes must be in BCP-47 format, such as "en-US" or + * "sr-Latn". For more information, see [Tags for Identifying + * Languages](https://tools.ietf.org/html/bcp47){: + * class="external" target="_blank" }. The default + * value is `en-US`. + */ + languageCode?: string; + /** + * Required during job update. The resource name for the job. This is + * generated by the service when a job is created. The format is + * "projects/{project_id}/jobs/{job_id}", for example, + * "projects/api-test-project/jobs/1234". Use of this field in + * job queries and API calls is preferred over the use of requisition_id + * since this value is unique. + */ + name?: string; + /** + * Output only. The timestamp when this job posting was created. + */ + postingCreateTime?: string; + /** + * Optional but strongly recommended for the best service experience. The + * expiration timestamp of the job. After this timestamp, the job is marked + * as expired, and it no longer appears in search results. The expired job + * can't be deleted or listed by the DeleteJob and ListJobs APIs, but it + * can be retrieved with the GetJob API or updated with the UpdateJob API. + * An expired job can be updated and opened again by using a future + * expiration timestamp. Updating an expired job fails if there is another + * existing open job with same company_name, language_code and + * requisition_id. The expired jobs are retained in our system for 90 days. + * However, the overall expired job count cannot exceed 3 times the maximum + * of open jobs count over the past week, otherwise jobs with earlier expire + * time are cleaned first. Expired jobs are no longer accessible after they + * are cleaned out. Invalid timestamps are ignored, and treated as expire + * time not provided. Timestamp before the instant request is made is + * considered valid, the job will be treated as expired immediately. If + * this value is not provided at the time of job creation or is invalid, the + * job posting expires after 30 days from the job's creation time. For + * example, if the job was created on 2017/01/01 13:00AM UTC with an + * unspecified expiration date, the job expires after 2017/01/31 13:00AM + * UTC. If this value is not provided on job update, it depends on the + * field masks set by UpdateJobRequest.update_mask. If the field masks + * include expiry_time, or the masks are empty meaning that every field is + * updated, the job posting expires after 30 days from the job's last + * update time. Otherwise the expiration date isn't updated. + */ + postingExpireTime?: string; + /** + * Optional. The timestamp this job posting was most recently published. + * The default value is the time the request arrives at the server. Invalid + * timestamps are ignored. + */ + postingPublishTime?: string; + /** + * Optional. The job PostingRegion (for example, state, country) throughout + * which the job is available. If this field is set, a LocationFilter in a + * search query within the job region finds this job posting if an exact + * location match is not specified. If this field is set to + * PostingRegion.NATION_WIDE or [PostingRegion.ADMINISTRATIVE_AREA], setting + * job addresses to the same location level as this field is strongly + * recommended. + */ + postingRegion?: string; + /** + * Output only. The timestamp when this job posting was last updated. + */ + postingUpdateTime?: string; + /** + * Optional. Options for job processing. + */ + processingOptions?: Schema$ProcessingOptions; + /** + * Optional. A promotion value of the job, as determined by the client. The + * value determines the sort order of the jobs returned when searching for + * jobs using the featured jobs search call, with higher promotional values + * being returned first and ties being resolved by relevance sort. Only the + * jobs with a promotionValue >0 are returned in a FEATURED_JOB_SEARCH. + * Default value is 0, and negative values are treated as 0. + */ + promotionValue?: number; + /** + * Optional. A description of the qualifications required to perform the + * job. The use of this field is recommended as an alternative to using the + * more general description field. This field accepts and sanitizes HTML + * input, and also accepts bold, italic, ordered list, and unordered list + * markup tags. The maximum number of allowed characters is 10,000. + */ + qualifications?: string; + /** + * Required. The requisition ID, also referred to as the posting ID, + * assigned by the client to identify a job. This field is intended to be + * used by clients for client identification and tracking of postings. A job + * is not allowed to be created if there is another job with the same + * [company_name], language_code and requisition_id. The maximum number of + * allowed characters is 255. + */ + requisitionId?: string; + /** + * Optional. A description of job responsibilities. The use of this field + * is recommended as an alternative to using the more general description + * field. This field accepts and sanitizes HTML input, and also accepts + * bold, italic, ordered list, and unordered list markup tags. The maximum + * number of allowed characters is 10,000. + */ + responsibilities?: string; + /** + * Required. The title of the job, such as "Software Engineer" + * The maximum number of allowed characters is 500. + */ + title?: string; + /** + * Optional. The visibility of the job. Defaults to + * Visibility.ACCOUNT_ONLY if not specified. + */ + visibility?: string; + } + /** + * Output only. Derived details about the job posting. + */ + export interface Schema$JobDerivedInfo { + /** + * Job categories derived from Job.title and Job.description. + */ + jobCategories?: string[]; + /** + * Structured locations of the job, resolved from Job.addresses. locations + * are exactly matched to Job.addresses in the same order. + */ + locations?: Schema$Location[]; + } + /** + * An event issued when a job seeker interacts with the application that + * implements Cloud Talent Solution. + */ + export interface Schema$JobEvent { + /** + * Required. The job name(s) associated with this event. For example, if + * this is an impression event, this field contains the identifiers of all + * jobs shown to the job seeker. If this was a view event, this field + * contains the identifier of the viewed job. + */ + jobs?: string[]; + /** + * Required. The type of the event (see JobEventType). + */ + type?: string; + } + /** + * Input only. The query required to perform a search query. + */ + export interface Schema$JobQuery { + /** + * Optional. Allows filtering jobs by commute time with different travel + * methods (for example, driving or public transit). Note: This only works + * with COMMUTE MODE. When specified, [JobQuery.location_filters] is + * ignored. Currently we don't support sorting by commute time. + */ + commuteFilter?: Schema$CommuteFilter; + /** + * Optional. This filter specifies the exact company display name of the + * jobs to search against. If a value isn't specified, jobs within the + * search results are associated with any company. If multiple values are + * specified, jobs within the search results may be associated with any of + * the specified companies. At most 20 company display name filters are + * allowed. + */ + companyDisplayNames?: string[]; + /** + * Optional. This filter specifies the company entities to search against. + * If a value isn't specified, jobs are searched for against all + * companies. If multiple values are specified, jobs are searched against + * the companies specified. The format is + * "projects/{project_id}/companies/{company_id}", for example, + * "projects/api-test-project/companies/foo". At most 20 company + * filters are allowed. + */ + companyNames?: string[]; + /** + * Optional. This search filter is applied only to Job.compensation_info. + * For example, if the filter is specified as "Hourly job with per-hour + * compensation > $15", only jobs meeting these criteria are + * searched. If a filter isn't defined, all open jobs are searched. + */ + compensationFilter?: Schema$CompensationFilter; + /** + * Optional. This filter specifies a structured syntax to match against the + * Job.custom_attributes marked as `filterable`. The syntax for this + * expression is a subset of Google SQL syntax. Supported operators are: =, + * !=, <, <=, >, >= where the left of the operator is a custom + * field key and the right of the operator is a number or string (surrounded + * by quotes) value. Supported functions are LOWER(<field_name>) to + * perform case insensitive match and EMPTY(<field_name>) to filter on + * the existence of a key. Boolean expressions (AND/OR/NOT) are supported + * up to 3 levels of nesting (for example, "((A AND B AND C) OR NOT D) + * AND E"), a maximum of 50 comparisons/functions are allowed in the + * expression. The expression must be < 2000 characters in length. Sample + * Query: (LOWER(driving_license)="class a" OR + * EMPTY(driving_license)) AND driving_years > 10 + */ + customAttributeFilter?: string; + /** + * Optional. This flag controls the spell-check feature. If false, the + * service attempts to correct a misspelled query, for example, + * "enginee" is corrected to "engineer". Defaults to + * false: a spell check is performed. + */ + disableSpellCheck?: boolean; + /** + * Optional. The employment type filter specifies the employment type of + * jobs to search against, such as EmploymentType.FULL_TIME. If a value is + * not specified, jobs in the search results includes any employment type. + * If multiple values are specified, jobs in the search results include any + * of the specified employment types. + */ + employmentTypes?: string[]; + /** + * Optional. The category filter specifies the categories of jobs to search + * against. See Category for more information. If a value is not specified, + * jobs from any category are searched against. If multiple values are + * specified, jobs from any of the specified categories are searched + * against. + */ + jobCategories?: string[]; + /** + * Optional. This filter specifies the locale of jobs to search against, + * for example, "en-US". If a value isn't specified, the + * search results can contain jobs in any locale. Language codes should be + * in BCP-47 format, such as "en-US" or "sr-Latn". For + * more information, see [Tags for Identifying + * Languages](https://tools.ietf.org/html/bcp47). At most 10 language code + * filters are allowed. + */ + languageCodes?: string[]; + /** + * Optional. The location filter specifies geo-regions containing the jobs + * to search against. See LocationFilter for more information. If a + * location value isn't specified, jobs fitting the other search + * criteria are retrieved regardless of where they're located. If + * multiple values are specified, jobs are retrieved from any of the + * specified locations, and, if different values are specified for the + * LocationFilter.distance_in_miles parameter, the maximum provided distance + * is used for all locations. At most 5 location filters are allowed. + */ + locationFilters?: Schema$LocationFilter[]; + /** + * Optional. Jobs published within a range specified by this filter are + * searched against. + */ + publishTimeRange?: Schema$TimestampRange; + /** + * Optional. The query string that matches against the job title, + * description, and location fields. The maximum number of allowed + * characters is 255. + */ + query?: string; + } + /** + * An object representing a latitude/longitude pair. This is expressed as a + * pair of doubles representing degrees latitude and degrees longitude. Unless + * specified otherwise, this must conform to the <a + * href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 + * standard</a>. Values must be within normalized ranges. + */ + export interface Schema$LatLng { + /** + * The latitude in degrees. It must be in the range [-90.0, +90.0]. + */ + latitude?: number; + /** + * The longitude in degrees. It must be in the range [-180.0, +180.0]. + */ + longitude?: number; + } + /** + * Output only. The List companies response object. + */ + export interface Schema$ListCompaniesResponse { + /** + * Companies for the current client. + */ + companies?: Schema$Company[]; + /** + * Additional information for the API invocation, such as the request + * tracking id. + */ + metadata?: Schema$ResponseMetadata; + /** + * A token to retrieve the next page of results. + */ + nextPageToken?: string; + } + /** + * Output only. List jobs response. + */ + export interface Schema$ListJobsResponse { + /** + * The Jobs for a given company. The maximum number of items returned is + * based on the limit field provided in the request. + */ + jobs?: Schema$Job[]; + /** + * Additional information for the API invocation, such as the request + * tracking id. + */ + metadata?: Schema$ResponseMetadata; + /** + * A token to retrieve the next page of results. + */ + nextPageToken?: string; + } + /** + * Output only. A resource that represents a location with full geographic + * information. + */ + export interface Schema$Location { + /** + * An object representing a latitude/longitude pair. + */ + latLng?: Schema$LatLng; + /** + * The type of a location, which corresponds to the address lines field of + * PostalAddress. For example, "Downtown, Atlanta, GA, USA" has a + * type of LocationType#NEIGHBORHOOD, and "Kansas City, KS, USA" + * has a type of LocationType#LOCALITY. + */ + locationType?: string; + /** + * Postal address of the location that includes human readable information, + * such as postal delivery and payments addresses. Given a postal address, a + * postal service can deliver items to a premises, P.O. Box, or other + * delivery location. + */ + postalAddress?: Schema$PostalAddress; + /** + * Radius in meters of the job location. This value is derived from the + * location bounding box in which a circle with the specified radius + * centered from LatLng coves the area associated with the job location. For + * example, currently, "Mountain View, CA, USA" has a radius + * of 6.17 miles. + */ + radiusInMiles?: number; + } + /** + * Input only. Geographic region of the search. + */ + export interface Schema$LocationFilter { + /** + * Optional. The address name, such as "Mountain View" or + * "Bay Area". + */ + address?: string; + /** + * Optional. The distance_in_miles is applied when the location being + * searched for is identified as a city or smaller. When the location being + * searched for is a state or larger, this field is ignored. + */ + distanceInMiles?: number; + /** + * Optional. The latitude and longitude of the geographic center from which + * to search. This field's ignored if `address` is provided. + */ + latLng?: Schema$LatLng; + /** + * Optional. CLDR region code of the country/region of the address. This is + * used to address ambiguity of the user-input location, for example, + * "Liverpool" against "Liverpool, NY, US" or + * "Liverpool, UK". Set this field if all the jobs to search + * against are from a same region, or jobs are world-wide, but the job + * seeker is from a specific region. See http://cldr.unicode.org/ and + * http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html + * for details. Example: "CH" for Switzerland. + */ + regionCode?: string; + /** + * Optional. Allows the client to return jobs without a set location, + * specifically, telecommuting jobs (telecomuting is considered by the + * service as a special location. Job.posting_region indicates if a job + * permits telecommuting. If this field is set to + * TelecommutePreference.TELECOMMUTE_ALLOWED, telecommuting jobs are + * searched, and address and lat_lng are ignored. If not set or set to + * TelecommutePreference.TELECOMMUTE_EXCLUDED, telecommute job are not + * searched. This filter can be used by itself to search exclusively for + * telecommuting jobs, or it can be combined with another location filter to + * search for a combination of job locations, such as "Mountain + * View" or "telecommuting" jobs. However, when used in + * combination with other location filters, telecommuting jobs can be + * treated as less relevant than other jobs in the search response. + */ + telecommutePreference?: string; + } + /** + * Output only. Job entry with metadata inside SearchJobsResponse. + */ + export interface Schema$MatchingJob { + /** + * Commute information which is generated based on specified CommuteFilter. + */ + commuteInfo?: Schema$CommuteInfo; + /** + * Job resource that matches the specified SearchJobsRequest. + */ + job?: Schema$Job; + /** + * A summary of the job with core information that's displayed on the + * search results listing page. + */ + jobSummary?: string; + /** + * Contains snippets of text from the Job.job_title field most closely + * matching a search query's keywords, if available. The matching query + * keywords are enclosed in HTML bold tags. + */ + jobTitleSnippet?: string; + /** + * Contains snippets of text from the Job.description and similar fields + * that most closely match a search query's keywords, if available. All + * HTML tags in the original fields are stripped when returned in this + * field, and matching query keywords are enclosed in HTML bold tags. + */ + searchTextSnippet?: string; + } + /** + * Represents an amount of money with its currency type. + */ + export interface Schema$Money { + /** + * The 3-letter currency code defined in ISO 4217. + */ + currencyCode?: string; + /** + * Number of nano (10^-9) units of the amount. The value must be between + * -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` + * must be positive or zero. If `units` is zero, `nanos` can be positive, + * zero, or negative. If `units` is negative, `nanos` must be negative or + * zero. For example $-1.75 is represented as `units`=-1 and + * `nanos`=-750,000,000. + */ + nanos?: number; + /** + * The whole units of the amount. For example if `currencyCode` is + * `"USD"`, then 1 unit is one US dollar. + */ + units?: string; + } + /** + * Input only. Use this field to specify bucketing option for the histogram + * search response. + */ + export interface Schema$NumericBucketingOption { + /** + * Required. Two adjacent values form a histogram bucket. Values should be + * in ascending order. For example, if [5, 10, 15] are provided, four + * buckets are created: (-inf, 5), 5, 10), [10, 15), [15, inf). At most 20 + * [buckets_bound is supported. + */ + bucketBounds?: number[]; + /** + * Optional. If set to true, the histogram result includes minimum/maximum + * value of the numeric field. + */ + requiresMinMax?: boolean; + } + /** + * Output only. Custom numeric bucketing result. + */ + export interface Schema$NumericBucketingResult { + /** + * Count within each bucket. Its size is the length of + * NumericBucketingOption.bucket_bounds plus 1. + */ + counts?: Schema$BucketizedCount[]; + /** + * Stores the maximum value of the numeric field. Is populated only if + * [NumericBucketingOption.requires_min_max] is set to true. + */ + maxValue?: number; + /** + * Stores the minimum value of the numeric field. Will be populated only if + * [NumericBucketingOption.requires_min_max] is set to true. + */ + minValue?: number; + } + /** + * Represents a postal address, e.g. for postal delivery or payments + * addresses. Given a postal address, a postal service can deliver items to a + * premise, P.O. Box or similar. It is not intended to model geographical + * locations (roads, towns, mountains). In typical usage an address would be + * created via user input or from importing existing data, depending on the + * type of process. Advice on address input / editing: - Use an i18n-ready + * address widget such as https://github.com/googlei18n/libaddressinput) - + * Users should not be presented with UI elements for input or editing of + * fields outside countries where that field is used. For more guidance on + * how to use this schema, please see: + * https://support.google.com/business/answer/6397478 + */ + export interface Schema$PostalAddress { + /** + * Unstructured address lines describing the lower levels of an address. + * Because values in address_lines do not have type information and may + * sometimes contain multiple values in a single field (e.g. "Austin, + * TX"), it is important that the line order is clear. The order of + * address lines should be "envelope order" for the country/region + * of the address. In places where this can vary (e.g. Japan), + * address_language is used to make it explicit (e.g. "ja" for + * large-to-small ordering and "ja-Latn" or "en" for + * small-to-large). This way, the most specific line of an address can be + * selected based on the language. The minimum permitted structural + * representation of an address consists of a region_code with all remaining + * information placed in the address_lines. It would be possible to format + * such an address very approximately without geocoding, but no semantic + * reasoning could be made about any of the address components until it was + * at least partially resolved. Creating an address only containing a + * region_code and address_lines, and then geocoding is the recommended way + * to handle completely unstructured addresses (as opposed to guessing which + * parts of the address should be localities or administrative areas). + */ + addressLines?: string[]; + /** + * Optional. Highest administrative subdivision which is used for postal + * addresses of a country or region. For example, this can be a state, a + * province, an oblast, or a prefecture. Specifically, for Spain this is the + * province and not the autonomous community (e.g. "Barcelona" and + * not "Catalonia"). Many countries don't use an + * administrative area in postal addresses. E.g. in Switzerland this should + * be left unpopulated. + */ + administrativeArea?: string; + /** + * Optional. BCP-47 language code of the contents of this address (if + * known). This is often the UI language of the input form or is expected to + * match one of the languages used in the address' country/region, or + * their transliterated equivalents. This can affect formatting in certain + * countries, but is not critical to the correctness of the data and will + * never affect any validation or other non-formatting related operations. + * If this value is not known, it should be omitted (rather than specifying + * a possibly incorrect default). Examples: "zh-Hant", + * "ja", "ja-Latn", "en". + */ + languageCode?: string; + /** + * Optional. Generally refers to the city/town portion of the address. + * Examples: US city, IT comune, UK post town. In regions of the world where + * localities are not well defined or do not fit into this structure well, + * leave locality empty and use address_lines. + */ + locality?: string; + /** + * Optional. The name of the organization at the address. + */ + organization?: string; + /** + * Optional. Postal code of the address. Not all countries use or require + * postal codes to be present, but where they are used, they may trigger + * additional validation with other parts of the address (e.g. state/zip + * validation in the U.S.A.). + */ + postalCode?: string; + /** + * Optional. The recipient at the address. This field may, under certain + * circumstances, contain multiline information. For example, it might + * contain "care of" information. + */ + recipients?: string[]; + /** + * Required. CLDR region code of the country/region of the address. This is + * never inferred and it is up to the user to ensure the value is correct. + * See http://cldr.unicode.org/ and + * http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html + * for details. Example: "CH" for Switzerland. + */ + regionCode?: string; + /** + * The schema revision of the `PostalAddress`. This must be set to 0, which + * is the latest revision. All new revisions **must** be backward + * compatible with old revisions. + */ + revision?: number; + /** + * Optional. Additional, country-specific, sorting code. This is not used in + * most regions. Where it is used, the value is either a string like + * "CEDEX", optionally followed by a number (e.g. "CEDEX + * 7"), or just a number alone, representing the "sector + * code" (Jamaica), "delivery area indicator" (Malawi) or + * "post office indicator" (e.g. Côte d'Ivoire). + */ + sortingCode?: string; + /** + * Optional. Sublocality of the address. For example, this can be + * neighborhoods, boroughs, districts. + */ + sublocality?: string; + } + /** + * Input only. Options for job processing. + */ + export interface Schema$ProcessingOptions { + /** + * Optional. If set to `true`, the service does not attempt to resolve a + * more precise address for the job. + */ + disableStreetAddressResolution?: boolean; + /** + * Optional. Option for job HTML content sanitization. Applied fields are: + * * description * applicationInfo.instruction * incentives * qualifications + * * responsibilities HTML tags in these fields may be stripped if + * sanitiazation is not disabled. Defaults to + * HtmlSanitization.SIMPLE_FORMATTING_ONLY. + */ + htmlSanitization?: string; + } + /** + * Input only. Meta information related to the job searcher or entity + * conducting the job search. This information is used to improve the + * performance of the service. + */ + export interface Schema$RequestMetadata { + /** + * Optional. The type of device used by the job seeker at the time of the + * call to the service. + */ + deviceInfo?: Schema$DeviceInfo; + /** + * Required. The client-defined scope or source of the service call, which + * typically is the domain on which the service has been implemented and is + * currently being run. For example, if the service is being run by client + * <em>Foo, Inc.</em>, on job board www.foo.com and career site + * www.bar.com, then this field is set to "foo.com" for use on the + * job board, and "bar.com" for use on the career site. If this + * field isn't available for some reason, send "UNKNOWN". Any + * improvements to the model for a particular tenant site rely on this field + * being set correctly to a domain. The maximum number of allowed + * characters is 255. + */ + domain?: string; + /** + * Required. A unique session identification string. A session is defined + * as the duration of an end user's interaction with the service over a + * certain period. Obfuscate this field for privacy concerns before + * providing it to the service. If this field is not available for some + * reason, send "UNKNOWN". Note that any improvements to the model + * for a particular tenant site, rely on this field being set correctly to + * some unique session_id. The maximum number of allowed characters is 255. + */ + sessionId?: string; + /** + * Required. A unique user identification string, as determined by the + * client. To have the strongest positive impact on search quality make sure + * the client-level is unique. Obfuscate this field for privacy concerns + * before providing it to the service. If this field is not available for + * some reason, send "UNKNOWN". Note that any improvements to the + * model for a particular tenant site, rely on this field being set + * correctly to a unique user_id. The maximum number of allowed characters + * is 255. + */ + userId?: string; + } + /** + * Output only. Additional information returned to client, such as debugging + * information. + */ + export interface Schema$ResponseMetadata { + /** + * A unique id associated with this call. This id is logged for tracking + * purposes. + */ + requestId?: string; + } + /** + * Input only. The Request body of the `SearchJobs` call. + */ + export interface Schema$SearchJobsRequest { + /** + * Optional. Controls over how job documents get ranked on top of existing + * relevance score (determined by API algorithm). + */ + customRankingInfo?: Schema$CustomRankingInfo; + /** + * Optional. Controls whether to disable exact keyword match on + * Job.job_title, Job.description, Job.company_display_name, Job.locations, + * Job.qualifications. When disable keyword match is turned off, a keyword + * match returns jobs that do not match given category filters when there + * are matching keywords. For example, the query "program + * manager," a result is returned even if the job posting has the title + * "software developer," which does not fall into "program + * manager" ontology, but does have "program manager" + * appearing in its description. For queries like "cloud" that + * does not contain title or location specific ontology, jobs with + * "cloud" keyword matches are returned regardless of this + * flag's value. Please use Company.keyword_searchable_custom_fields or + * Company.keyword_searchable_custom_attributes if company specific globally + * matched custom field/attribute string values is needed. Enabling keyword + * match improves recall of subsequent search requests. Defaults to false. + */ + disableKeywordMatch?: boolean; + /** + * Optional. Controls whether to broaden the search when it produces sparse + * results. Broadened queries append results to the end of the matching + * results list. Defaults to false. + */ + enableBroadening?: boolean; + /** + * Optional. Histogram requests for jobs matching JobQuery. + */ + histogramFacets?: Schema$HistogramFacets; + /** + * Optional. Expression based histogram requests for jobs matching + * JobQuery. + */ + histogramQueries?: Schema$HistogramQuery[]; + /** + * Optional. Query used to search against jobs, such as keyword, location + * filters, etc. + */ + jobQuery?: Schema$JobQuery; + /** + * Optional. The desired job attributes returned for jobs in the search + * response. Defaults to JobView.SMALL if no value is specified. + */ + jobView?: string; + /** + * Optional. An integer that specifies the current offset (that is, + * starting result location, amongst the jobs deemed by the API as relevant) + * in search results. This field is only considered if page_token is unset. + * For example, 0 means to return results starting from the first matching + * job, and 10 means to return from the 11th job. This can be used for + * pagination, (for example, pageSize = 10 and offset = 10 means to return + * from the second page). + */ + offset?: number; + /** + * Optional. The criteria determining how search results are sorted. + * Default is "relevance desc". Supported options are: * + * "relevance desc": By relevance descending, as determined by the + * API algorithms. Relevance thresholding of query results is only available + * with this ordering. * "posting_publish_time desc": By + * Job.posting_publish_time descending. * "posting_update_time + * desc": By Job.posting_update_time descending. * "title": + * By Job.title ascending. * "title desc": By Job.title + * descending. * "annualized_base_compensation": By job's + * CompensationInfo.annualized_base_compensation_range ascending. Jobs whose + * annualized base compensation is unspecified are put at the end of search + * results. * "annualized_base_compensation desc": By job's + * CompensationInfo.annualized_base_compensation_range descending. Jobs + * whose annualized base compensation is unspecified are put at the end of + * search results. * "annualized_total_compensation": By job's + * CompensationInfo.annualized_total_compensation_range ascending. Jobs + * whose annualized base compensation is unspecified are put at the end of + * search results. * "annualized_total_compensation desc": By + * job's CompensationInfo.annualized_total_compensation_range + * descending. Jobs whose annualized base compensation is unspecified are + * put at the end of search results. * "custom_ranking desc": By + * the relevance score adjusted to the + * SearchJobsRequest.custom_ranking_info.ranking_expression with weight + * factor assigned by SearchJobsRequest.custom_ranking_info.importance_level + * in descending order. + */ + orderBy?: string; + /** + * Optional. A limit on the number of jobs returned in the search results. + * Increasing this value above the default value of 10 can increase search + * response time. The value can be between 1 and 100. + */ + pageSize?: number; + /** + * Optional. The token specifying the current offset within search results. + * See SearchJobsResponse.next_page_token for an explanation of how to + * obtain the next set of query results. + */ + pageToken?: string; + /** + * Required. The meta information collected about the job searcher, used to + * improve the search quality of the service.. The identifiers, (such as + * `user_id`) are provided by users, and must be unique and consistent. + */ + requestMetadata?: Schema$RequestMetadata; + /** + * Optional. Controls if the search job request requires the return of a + * precise count of the first 300 results. Setting this to `true` ensures + * consistency in the number of results per page. Best practice is to set + * this value to true if a client allows users to jump directly to a + * non-sequential search results page. Enabling this flag may adversely + * impact performance. Defaults to false. + */ + requirePreciseResultSize?: boolean; + /** + * Optional. Mode of a search. Defaults to SearchMode.JOB_SEARCH. + */ + searchMode?: string; + } + /** + * Output only. Response for SearchJob method. + */ + export interface Schema$SearchJobsResponse { + /** + * If query broadening is enabled, we may append additional results from the + * broadened query. This number indicates how many of the jobs returned in + * the jobs field are from the broadened query. These results are always at + * the end of the jobs list. In particular, a value of 0, or if the field + * isn't set, all the jobs in the jobs list are from the original + * (without broadening) query. If this field is non-zero, subsequent + * requests with offset after this result set should contain all broadened + * results. + */ + broadenedQueryJobsCount?: number; + /** + * An estimation of the number of jobs that match the specified query. This + * number is not guaranteed to be accurate. For accurate results, see + * enable_precise_result_size. + */ + estimatedTotalSize?: number; + /** + * The histogram results that match with specified + * SearchJobsRequest.histogram_queries. + */ + histogramQueryResults?: Schema$HistogramQueryResult[]; + /** + * The histogram results that match specified + * SearchJobsRequest.histogram_facets. + */ + histogramResults?: Schema$HistogramResults; + /** + * The location filters that the service applied to the specified query. If + * any filters are lat-lng based, the JobLocation.location_type is + * JobLocation.LocationType#LOCATION_TYPE_UNSPECIFIED. + */ + locationFilters?: Schema$Location[]; + /** + * The Job entities that match the specified SearchJobsRequest. + */ + matchingJobs?: Schema$MatchingJob[]; + /** + * Additional information for the API invocation, such as the request + * tracking id. + */ + metadata?: Schema$ResponseMetadata; + /** + * The token that specifies the starting position of the next page of + * results. This field is empty if there are no more results. + */ + nextPageToken?: string; + /** + * The spell checking result, and correction. + */ + spellCorrection?: Schema$SpellingCorrection; + /** + * The precise result count, which is available only if the client set + * enable_precise_result_size to `true` or if the response is the last page + * of results. Otherwise, the value will be `-1`. + */ + totalSize?: number; + } + /** + * Output only. Spell check result. + */ + export interface Schema$SpellingCorrection { + /** + * Indicates if the query was corrected by the spell checker. + */ + corrected?: boolean; + /** + * Correction output consisting of the corrected keyword string. + */ + correctedText?: string; + } + /** + * Represents a time of day. The date and time zone are either not significant + * or are specified elsewhere. An API may choose to allow leap seconds. + * Related types are google.type.Date and `google.protobuf.Timestamp`. + */ + export interface Schema$TimeOfDay { + /** + * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose + * to allow the value "24:00:00" for scenarios like business + * closing time. + */ + hours?: number; + /** + * Minutes of hour of day. Must be from 0 to 59. + */ + minutes?: number; + /** + * Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + */ + nanos?: number; + /** + * Seconds of minutes of the time. Must normally be from 0 to 59. An API may + * allow the value 60 if it allows leap-seconds. + */ + seconds?: number; + } + /** + * Message representing a period of time between two timestamps. + */ + export interface Schema$TimestampRange { + /** + * End of the period. + */ + endTime?: string; + /** + * Begin of the period. + */ + startTime?: string; + } + /** + * Input only. Request for updating a specified company. + */ + export interface Schema$UpdateCompanyRequest { + /** + * Required. The company resource to replace the current resource in the + * system. + */ + company?: Schema$Company; + /** + * Optional but strongly recommended for the best service experience. If + * update_mask is provided, only the specified fields in company are + * updated. Otherwise all the fields are updated. A field mask to specify + * the company fields to be updated. Only top level fields of Company are + * supported. + */ + updateMask?: string; + } + /** + * Input only. Update job request. + */ + export interface Schema$UpdateJobRequest { + /** + * Required. The Job to be updated. + */ + job?: Schema$Job; + /** + * Optional but strongly recommended to be provided for the best service + * experience. If update_mask is provided, only the specified fields in job + * are updated. Otherwise all the fields are updated. A field mask to + * restrict the fields that are updated. Only top level fields of Job are + * supported. + */ + updateMask?: string; + } + + + export class Resource$Projects { + root: Jobs; + clientEvents: Resource$Projects$Clientevents; + companies: Resource$Projects$Companies; + jobs: Resource$Projects$Jobs; + constructor(root: Jobs) { + this.root = root; + this.getRoot.bind(this); + this.clientEvents = new Resource$Projects$Clientevents(root); + this.companies = new Resource$Projects$Companies(root); + this.jobs = new Resource$Projects$Jobs(root); + } + + getRoot() { + return this.root; + } + + + /** + * jobs.projects.complete + * @desc Completes the specified prefix with keyword suggestions. Intended + * for use by a job search auto-complete search box. + * @alias jobs.projects.complete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.companyName Optional. If provided, restricts completion to specified company. The format is "projects/{project_id}/companies/{company_id}", for example, "projects/api-test-project/companies/foo". + * @param {string=} params.languageCode Required. The language of the query. This is the BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). For CompletionType.JOB_TITLE type, only open jobs with same language_code are returned. For CompletionType.COMPANY_NAME type, only companies having open jobs with same language_code are returned. For CompletionType.COMBINED type, only open jobs with same language_code or companies having open jobs with same language_code are returned. The maximum number of allowed characters is 255. + * @param {string} params.name Required. Resource name of project the completion is performed within. The format is "projects/{project_id}", for example, "projects/api-test-project". + * @param {integer=} params.pageSize Required. Completion result count. The maximum allowed page size is 10. + * @param {string=} params.query Required. The query used to generate suggestions. The maximum number of allowed characters is 255. + * @param {string=} params.scope Optional. The scope of the completion. The defaults is CompletionScope.PUBLIC. + * @param {string=} params.type Optional. The completion topic. The default is CompletionType.COMBINED. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + complete( + params?: Params$Resource$Projects$Complete, + options?: MethodOptions): AxiosPromise; + complete( + params: Params$Resource$Projects$Complete, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + complete( + params: Params$Resource$Projects$Complete, + callback: BodyResponseCallback): void; + complete(callback: BodyResponseCallback): + void; + complete( + paramsOrCallback?: Params$Resource$Projects$Complete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Complete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Complete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3p1beta1/{+name}:complete') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Complete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Optional. If provided, restricts completion to specified company. The + * format is "projects/{project_id}/companies/{company_id}", for example, + * "projects/api-test-project/companies/foo". + */ + companyName?: string; + /** + * Required. The language of the query. This is the BCP-47 language code, + * such as "en-US" or "sr-Latn". For more information, see [Tags for + * Identifying Languages](https://tools.ietf.org/html/bcp47). For + * CompletionType.JOB_TITLE type, only open jobs with same language_code are + * returned. For CompletionType.COMPANY_NAME type, only companies having + * open jobs with same language_code are returned. For + * CompletionType.COMBINED type, only open jobs with same language_code or + * companies having open jobs with same language_code are returned. The + * maximum number of allowed characters is 255. + */ + languageCode?: string; + /** + * Required. Resource name of project the completion is performed within. + * The format is "projects/{project_id}", for example, + * "projects/api-test-project". + */ + name?: string; + /** + * Required. Completion result count. The maximum allowed page size is 10. + */ + pageSize?: number; + /** + * Required. The query used to generate suggestions. The maximum number of + * allowed characters is 255. + */ + query?: string; + /** + * Optional. The scope of the completion. The defaults is + * CompletionScope.PUBLIC. + */ + scope?: string; + /** + * Optional. The completion topic. The default is CompletionType.COMBINED. + */ + type?: string; + } + + export class Resource$Projects$Clientevents { + root: Jobs; + constructor(root: Jobs) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * jobs.projects.clientEvents.create + * @desc Report events issued when end user interacts with customer's + * application that uses Cloud Talent Solution. You may inspect the created + * events in [self service + * tools](https://console.cloud.google.com/talent-solution/overview). [Learn + * more](https://cloud.google.com/talent-solution/job-search/docs/management-tools) + * about self service tools. + * @alias jobs.projects.clientEvents.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Parent project name. + * @param {().CreateClientEventRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params?: Params$Resource$Projects$Clientevents$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Projects$Clientevents$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Projects$Clientevents$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Projects$Clientevents$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Clientevents$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Clientevents$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3p1beta1/{+parent}/clientEvents') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Clientevents$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Parent project name. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CreateClientEventRequest; + } + + + export class Resource$Projects$Companies { + root: Jobs; + constructor(root: Jobs) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * jobs.projects.companies.create + * @desc Creates a new company entity. + * @alias jobs.projects.companies.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. Resource name of the project under which the company is created. The format is "projects/{project_id}", for example, "projects/api-test-project". + * @param {().CreateCompanyRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params?: Params$Resource$Projects$Companies$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Projects$Companies$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Projects$Companies$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Projects$Companies$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Companies$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Companies$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3p1beta1/{+parent}/companies') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.projects.companies.delete + * @desc Deletes specified company. + * @alias jobs.projects.companies.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The resource name of the company to be deleted. The format is "projects/{project_id}/companies/{company_id}", for example, "projects/api-test-project/companies/foo". + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete( + params?: Params$Resource$Projects$Companies$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Projects$Companies$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Projects$Companies$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Projects$Companies$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Companies$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Companies$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3p1beta1/{+name}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.projects.companies.get + * @desc Retrieves specified company. + * @alias jobs.projects.companies.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The resource name of the company to be retrieved. The format is "projects/{project_id}/companies/{company_id}", for example, "projects/api-test-project/companies/foo". + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Projects$Companies$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Projects$Companies$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Projects$Companies$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Projects$Companies$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Companies$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Companies$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3p1beta1/{+name}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.projects.companies.list + * @desc Lists all companies associated with the service account. + * @alias jobs.projects.companies.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize Optional. The maximum number of companies to be returned, at most 100. Default is 100 if a non-positive number is provided. + * @param {string=} params.pageToken Optional. The starting indicator from which to return results. + * @param {string} params.parent Required. Resource name of the project under which the company is created. The format is "projects/{project_id}", for example, "projects/api-test-project". + * @param {boolean=} params.requireOpenJobs Optional. Set to true if the companies requested must have open jobs. Defaults to false. If true, at most page_size of companies are fetched, among which only those with open jobs are returned. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: Params$Resource$Projects$Companies$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Projects$Companies$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Projects$Companies$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Projects$Companies$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Companies$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Companies$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3p1beta1/{+parent}/companies') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.projects.companies.patch + * @desc Updates specified company. Company names can't be updated. To + * update a company name, delete the company and all jobs associated with + * it, and only then re-create them. + * @alias jobs.projects.companies.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required during company update. The resource name for a company. This is generated by the service when a company is created. The format is "projects/{project_id}/companies/{company_id}", for example, "projects/api-test-project/companies/foo". + * @param {().UpdateCompanyRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Projects$Companies$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Projects$Companies$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Projects$Companies$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Projects$Companies$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Companies$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Companies$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3p1beta1/{+name}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Companies$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. Resource name of the project under which the company is + * created. The format is "projects/{project_id}", for example, + * "projects/api-test-project". + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CreateCompanyRequest; + } + export interface Params$Resource$Projects$Companies$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The resource name of the company to be deleted. The format is + * "projects/{project_id}/companies/{company_id}", for example, + * "projects/api-test-project/companies/foo". + */ + name?: string; + } + export interface Params$Resource$Projects$Companies$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The resource name of the company to be retrieved. The format + * is "projects/{project_id}/companies/{company_id}", for example, + * "projects/api-test-project/companies/foo". + */ + name?: string; + } + export interface Params$Resource$Projects$Companies$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Optional. The maximum number of companies to be returned, at most 100. + * Default is 100 if a non-positive number is provided. + */ + pageSize?: number; + /** + * Optional. The starting indicator from which to return results. + */ + pageToken?: string; + /** + * Required. Resource name of the project under which the company is + * created. The format is "projects/{project_id}", for example, + * "projects/api-test-project". + */ + parent?: string; + /** + * Optional. Set to true if the companies requested must have open jobs. + * Defaults to false. If true, at most page_size of companies are fetched, + * among which only those with open jobs are returned. + */ + requireOpenJobs?: boolean; + } + export interface Params$Resource$Projects$Companies$Patch { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required during company update. The resource name for a company. This is + * generated by the service when a company is created. The format is + * "projects/{project_id}/companies/{company_id}", for example, + * "projects/api-test-project/companies/foo". + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$UpdateCompanyRequest; + } + + + export class Resource$Projects$Jobs { + root: Jobs; + constructor(root: Jobs) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * jobs.projects.jobs.batchDelete + * @desc Deletes a list of Jobs by filter. + * @alias jobs.projects.jobs.batchDelete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The resource name of the project under which the job is created. The format is "projects/{project_id}", for example, "projects/api-test-project". + * @param {().BatchDeleteJobsRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + batchDelete( + params?: Params$Resource$Projects$Jobs$Batchdelete, + options?: MethodOptions): AxiosPromise; + batchDelete( + params: Params$Resource$Projects$Jobs$Batchdelete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + batchDelete( + params: Params$Resource$Projects$Jobs$Batchdelete, + callback: BodyResponseCallback): void; + batchDelete(callback: BodyResponseCallback): void; + batchDelete( + paramsOrCallback?: Params$Resource$Projects$Jobs$Batchdelete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Jobs$Batchdelete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Jobs$Batchdelete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3p1beta1/{+parent}/jobs:batchDelete') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.projects.jobs.create + * @desc Creates a new job. Typically, the job becomes searchable within 10 + * seconds, but it may take up to 5 minutes. + * @alias jobs.projects.jobs.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The resource name of the project under which the job is created. The format is "projects/{project_id}", for example, "projects/api-test-project". + * @param {().CreateJobRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params?: Params$Resource$Projects$Jobs$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Projects$Jobs$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Projects$Jobs$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Projects$Jobs$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Jobs$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Jobs$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3p1beta1/{+parent}/jobs') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.projects.jobs.delete + * @desc Deletes the specified job. Typically, the job becomes unsearchable + * within 10 seconds, but it may take up to 5 minutes. + * @alias jobs.projects.jobs.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The resource name of the job to be deleted. The format is "projects/{project_id}/jobs/{job_id}", for example, "projects/api-test-project/jobs/1234". + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete( + params?: Params$Resource$Projects$Jobs$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Projects$Jobs$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Projects$Jobs$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Projects$Jobs$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Jobs$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Jobs$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3p1beta1/{+name}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.projects.jobs.get + * @desc Retrieves the specified job, whose status is OPEN or recently + * EXPIRED within the last 90 days. + * @alias jobs.projects.jobs.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The resource name of the job to retrieve. The format is "projects/{project_id}/jobs/{job_id}", for example, "projects/api-test-project/jobs/1234". + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Projects$Jobs$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Projects$Jobs$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Projects$Jobs$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Projects$Jobs$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Jobs$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Jobs$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3p1beta1/{+name}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.projects.jobs.list + * @desc Lists jobs by filter. + * @alias jobs.projects.jobs.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter Required. The filter string specifies the jobs to be enumerated. Supported operator: =, AND The fields eligible for filtering are: * `companyName` (Required) * `requisitionId` (Optional) Sample Query: * companyName = "projects/api-test-project/companies/123" * companyName = "projects/api-test-project/companies/123" AND requisitionId = "req-1" + * @param {string=} params.jobView Optional. The desired job attributes returned for jobs in the search response. Defaults to JobView.JOB_VIEW_FULL if no value is specified. + * @param {integer=} params.pageSize Optional. The maximum number of jobs to be returned per page of results. If job_view is set to JobView.JOB_VIEW_ID_ONLY, the maximum allowed page size is 1000. Otherwise, the maximum allowed page size is 100. Default is 100 if empty or a number < 1 is specified. + * @param {string=} params.pageToken Optional. The starting point of a query result. + * @param {string} params.parent Required. The resource name of the project under which the job is created. The format is "projects/{project_id}", for example, "projects/api-test-project". + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list(params?: Params$Resource$Projects$Jobs$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Projects$Jobs$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Projects$Jobs$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Projects$Jobs$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Jobs$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Jobs$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3p1beta1/{+parent}/jobs') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.projects.jobs.patch + * @desc Updates specified job. Typically, updated contents become visible + * in search results within 10 seconds, but it may take up to 5 minutes. + * @alias jobs.projects.jobs.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required during job update. The resource name for the job. This is generated by the service when a job is created. The format is "projects/{project_id}/jobs/{job_id}", for example, "projects/api-test-project/jobs/1234". Use of this field in job queries and API calls is preferred over the use of requisition_id since this value is unique. + * @param {().UpdateJobRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Projects$Jobs$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Projects$Jobs$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Projects$Jobs$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Projects$Jobs$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Jobs$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Jobs$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3p1beta1/{+name}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.projects.jobs.search + * @desc Searches for jobs using the provided SearchJobsRequest. This call + * constrains the visibility of jobs present in the database, and only + * returns jobs that the caller has permission to search against. + * @alias jobs.projects.jobs.search + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The resource name of the project to search within. The format is "projects/{project_id}", for example, "projects/api-test-project". + * @param {().SearchJobsRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + search( + params?: Params$Resource$Projects$Jobs$Search, + options?: MethodOptions): AxiosPromise; + search( + params: Params$Resource$Projects$Jobs$Search, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + search( + params: Params$Resource$Projects$Jobs$Search, + callback: BodyResponseCallback): void; + search(callback: BodyResponseCallback): void; + search( + paramsOrCallback?: Params$Resource$Projects$Jobs$Search| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Jobs$Search; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Jobs$Search; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3p1beta1/{+parent}/jobs:search') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * jobs.projects.jobs.searchForAlert + * @desc Searches for jobs using the provided SearchJobsRequest. This API + * call is intended for the use case of targeting passive job seekers (for + * example, job seekers who have signed up to receive email alerts about + * potential job opportunities), and has different algorithmic adjustments + * that are targeted to passive job seekers. This call constrains the + * visibility of jobs present in the database, and only returns jobs the + * caller has permission to search against. + * @alias jobs.projects.jobs.searchForAlert + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The resource name of the project to search within. The format is "projects/{project_id}", for example, "projects/api-test-project". + * @param {().SearchJobsRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + searchForAlert( + params?: Params$Resource$Projects$Jobs$Searchforalert, + options?: MethodOptions): AxiosPromise; + searchForAlert( + params: Params$Resource$Projects$Jobs$Searchforalert, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + searchForAlert( + params: Params$Resource$Projects$Jobs$Searchforalert, + callback: BodyResponseCallback): void; + searchForAlert(callback: BodyResponseCallback): + void; + searchForAlert( + paramsOrCallback?: Params$Resource$Projects$Jobs$Searchforalert| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Jobs$Searchforalert; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Jobs$Searchforalert; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3p1beta1/{+parent}/jobs:searchForAlert') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Jobs$Batchdelete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The resource name of the project under which the job is + * created. The format is "projects/{project_id}", for example, + * "projects/api-test-project". + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$BatchDeleteJobsRequest; + } + export interface Params$Resource$Projects$Jobs$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The resource name of the project under which the job is + * created. The format is "projects/{project_id}", for example, + * "projects/api-test-project". + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CreateJobRequest; + } + export interface Params$Resource$Projects$Jobs$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The resource name of the job to be deleted. The format is + * "projects/{project_id}/jobs/{job_id}", for example, + * "projects/api-test-project/jobs/1234". + */ + name?: string; + } + export interface Params$Resource$Projects$Jobs$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The resource name of the job to retrieve. The format is + * "projects/{project_id}/jobs/{job_id}", for example, + * "projects/api-test-project/jobs/1234". + */ + name?: string; + } + export interface Params$Resource$Projects$Jobs$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The filter string specifies the jobs to be enumerated. + * Supported operator: =, AND The fields eligible for filtering are: * + * `companyName` (Required) * `requisitionId` (Optional) Sample Query: * + * companyName = "projects/api-test-project/companies/123" * companyName = + * "projects/api-test-project/companies/123" AND requisitionId = "req-1" + */ + filter?: string; + /** + * Optional. The desired job attributes returned for jobs in the search + * response. Defaults to JobView.JOB_VIEW_FULL if no value is specified. + */ + jobView?: string; + /** + * Optional. The maximum number of jobs to be returned per page of results. + * If job_view is set to JobView.JOB_VIEW_ID_ONLY, the maximum allowed page + * size is 1000. Otherwise, the maximum allowed page size is 100. Default + * is 100 if empty or a number < 1 is specified. + */ + pageSize?: number; + /** + * Optional. The starting point of a query result. + */ + pageToken?: string; + /** + * Required. The resource name of the project under which the job is + * created. The format is "projects/{project_id}", for example, + * "projects/api-test-project". + */ + parent?: string; + } + export interface Params$Resource$Projects$Jobs$Patch { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required during job update. The resource name for the job. This is + * generated by the service when a job is created. The format is + * "projects/{project_id}/jobs/{job_id}", for example, + * "projects/api-test-project/jobs/1234". Use of this field in job queries + * and API calls is preferred over the use of requisition_id since this + * value is unique. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$UpdateJobRequest; + } + export interface Params$Resource$Projects$Jobs$Search { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The resource name of the project to search within. The format + * is "projects/{project_id}", for example, "projects/api-test-project". + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SearchJobsRequest; + } + export interface Params$Resource$Projects$Jobs$Searchforalert { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The resource name of the project to search within. The format + * is "projects/{project_id}", for example, "projects/api-test-project". + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SearchJobsRequest; + } +} diff --git a/src/apis/logging/README.md b/src/apis/logging/README.md index ecc1ca5470e..8e31ba85107 100644 --- a/src/apis/logging/README.md +++ b/src/apis/logging/README.md @@ -2,7 +2,7 @@ # @google/logging -> Writes log entries and manages your Stackdriver Logging configuration. +> Writes log entries and manages your Logging configuration. ## Installation diff --git a/src/apis/logging/v2.ts b/src/apis/logging/v2.ts index af36ebe620f..48c35dcd68a 100644 --- a/src/apis/logging/v2.ts +++ b/src/apis/logging/v2.ts @@ -340,10 +340,7 @@ export namespace logging_v2 { * "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" * "folders/[FOLDER_ID]" Projects listed in the project_ids field - * are added to this list. Only one of the permissions, - * <code>logging.logEntries.list</code> or - * <code>logging.privateLogEntries.list</code>, is needed for - * each parent resource. + * are added to this list. */ resourceNames?: string[]; } @@ -1268,14 +1265,12 @@ export namespace logging_v2 { * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" * "folders/[FOLDER_ID]/logs/[LOG_ID]" [LOG_ID] must be - * URL-encoded. For example, "projects/my-project-id/logs/syslog" - * or - * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". + * URL-encoded. For example: "projects/my-project-id/logs/syslog" + * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" * The permission <code>logging.logEntries.create</code> is * needed on each project, organization, billing account, or folder that is * receiving new log entries, whether the resource is specified in - * <code>logName</code> or in an individual log entry. For more - * information about log names, see LogEntry. + * <code>logName</code> or in an individual log entry. */ logName?: string; /** @@ -2262,7 +2257,7 @@ export namespace logging_v2 { * @param {object} params Parameters for request * @param {string} params.sinkName Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id". * @param {boolean=} params.uniqueWriterIdentity Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false. - * @param {string=} params.updateMask Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter. + * @param {string=} params.updateMask Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter. * @param {().LogSink} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -2333,7 +2328,7 @@ export namespace logging_v2 { * @param {object} params Parameters for request * @param {string} params.sinkName Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id". * @param {boolean=} params.uniqueWriterIdentity Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false. - * @param {string=} params.updateMask Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter. + * @param {string=} params.updateMask Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter. * @param {().LogSink} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -2519,7 +2514,7 @@ export namespace logging_v2 { * some point in the future, behavior will be removed and specifying an * empty updateMask will be an error.For a detailed FieldMask definition, * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: * updateMask=filter. */ updateMask?: string; @@ -2565,7 +2560,7 @@ export namespace logging_v2 { * some point in the future, behavior will be removed and specifying an * empty updateMask will be an error.For a detailed FieldMask definition, * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: * updateMask=filter. */ updateMask?: string; @@ -4161,7 +4156,7 @@ export namespace logging_v2 { * @param {object} params Parameters for request * @param {string} params.sinkName Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id". * @param {boolean=} params.uniqueWriterIdentity Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false. - * @param {string=} params.updateMask Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter. + * @param {string=} params.updateMask Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter. * @param {().LogSink} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -4232,7 +4227,7 @@ export namespace logging_v2 { * @param {object} params Parameters for request * @param {string} params.sinkName Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id". * @param {boolean=} params.uniqueWriterIdentity Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false. - * @param {string=} params.updateMask Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter. + * @param {string=} params.updateMask Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter. * @param {().LogSink} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -4418,7 +4413,7 @@ export namespace logging_v2 { * some point in the future, behavior will be removed and specifying an * empty updateMask will be an error.For a detailed FieldMask definition, * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: * updateMask=filter. */ updateMask?: string; @@ -4464,7 +4459,7 @@ export namespace logging_v2 { * some point in the future, behavior will be removed and specifying an * empty updateMask will be an error.For a detailed FieldMask definition, * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: * updateMask=filter. */ updateMask?: string; @@ -5739,7 +5734,7 @@ export namespace logging_v2 { * @param {object} params Parameters for request * @param {string} params.sinkName Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id". * @param {boolean=} params.uniqueWriterIdentity Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false. - * @param {string=} params.updateMask Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter. + * @param {string=} params.updateMask Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter. * @param {().LogSink} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -5810,7 +5805,7 @@ export namespace logging_v2 { * @param {object} params Parameters for request * @param {string} params.sinkName Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id". * @param {boolean=} params.uniqueWriterIdentity Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false. - * @param {string=} params.updateMask Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter. + * @param {string=} params.updateMask Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter. * @param {().LogSink} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -5996,7 +5991,7 @@ export namespace logging_v2 { * some point in the future, behavior will be removed and specifying an * empty updateMask will be an error.For a detailed FieldMask definition, * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: * updateMask=filter. */ updateMask?: string; @@ -6042,7 +6037,7 @@ export namespace logging_v2 { * some point in the future, behavior will be removed and specifying an * empty updateMask will be an error.For a detailed FieldMask definition, * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: * updateMask=filter. */ updateMask?: string; @@ -7451,7 +7446,7 @@ export namespace logging_v2 { * @param {object} params Parameters for request * @param {string} params.sinkName Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id". * @param {boolean=} params.uniqueWriterIdentity Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false. - * @param {string=} params.updateMask Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter. + * @param {string=} params.updateMask Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter. * @param {().LogSink} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -7522,7 +7517,7 @@ export namespace logging_v2 { * @param {object} params Parameters for request * @param {string} params.sinkName Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id". * @param {boolean=} params.uniqueWriterIdentity Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false. - * @param {string=} params.updateMask Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter. + * @param {string=} params.updateMask Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter. * @param {().LogSink} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -7708,7 +7703,7 @@ export namespace logging_v2 { * some point in the future, behavior will be removed and specifying an * empty updateMask will be an error.For a detailed FieldMask definition, * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: * updateMask=filter. */ updateMask?: string; @@ -7754,7 +7749,7 @@ export namespace logging_v2 { * some point in the future, behavior will be removed and specifying an * empty updateMask will be an error.For a detailed FieldMask definition, * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: * updateMask=filter. */ updateMask?: string; @@ -8051,7 +8046,7 @@ export namespace logging_v2 { * @param {object} params Parameters for request * @param {string} params.sinkName Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id". * @param {boolean=} params.uniqueWriterIdentity Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false. - * @param {string=} params.updateMask Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter. + * @param {string=} params.updateMask Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter. * @param {().LogSink} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -8235,7 +8230,7 @@ export namespace logging_v2 { * some point in the future, behavior will be removed and specifying an * empty updateMask will be an error.For a detailed FieldMask definition, * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: * updateMask=filter. */ updateMask?: string; diff --git a/src/apis/logging/v2beta1.ts b/src/apis/logging/v2beta1.ts index 9b6f2849c86..b3ed8a2ad29 100644 --- a/src/apis/logging/v2beta1.ts +++ b/src/apis/logging/v2beta1.ts @@ -317,10 +317,7 @@ export namespace logging_v2beta1 { * "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" * "folders/[FOLDER_ID]" Projects listed in the project_ids field - * are added to this list. Only one of the permissions, - * <code>logging.logEntries.list</code> or - * <code>logging.privateLogEntries.list</code>, is needed for - * each parent resource. + * are added to this list. */ resourceNames?: string[]; } @@ -1210,14 +1207,12 @@ export namespace logging_v2beta1 { * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" * "folders/[FOLDER_ID]/logs/[LOG_ID]" [LOG_ID] must be - * URL-encoded. For example, "projects/my-project-id/logs/syslog" - * or - * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". + * URL-encoded. For example: "projects/my-project-id/logs/syslog" + * "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" * The permission <code>logging.logEntries.create</code> is * needed on each project, organization, billing account, or folder that is * receiving new log entries, whether the resource is specified in - * <code>logName</code> or in an individual log entry. For more - * information about log names, see LogEntry. + * <code>logName</code> or in an individual log entry. */ logName?: string; /** @@ -4089,7 +4084,7 @@ export namespace logging_v2beta1 { * @param {object} params Parameters for request * @param {string} params.sinkName Required. The full resource name of the sink to update, including the parent resource and the sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" "folders/[FOLDER_ID]/sinks/[SINK_ID]" Example: "projects/my-project-id/sinks/my-sink-id". * @param {boolean=} params.uniqueWriterIdentity Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false. - * @param {string=} params.updateMask Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: updateMask=filter. + * @param {string=} params.updateMask Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: updateMask=filter. * @param {().LogSink} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -4276,7 +4271,7 @@ export namespace logging_v2beta1 { * some point in the future, behavior will be removed and specifying an * empty updateMask will be an error.For a detailed FieldMask definition, * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmaskExample: + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskExample: * updateMask=filter. */ updateMask?: string; diff --git a/src/apis/ml/v1.ts b/src/apis/ml/v1.ts index 49e94ad1534..d8ab6c3a291 100644 --- a/src/apis/ml/v1.ts +++ b/src/apis/ml/v1.ts @@ -585,6 +585,10 @@ export namespace ml_v1 { * `"projects/YOUR_PROJECT/models/YOUR_MODEL"` */ modelName?: string; + /** + * Optional. Format of the output data files, defaults to JSON. + */ + outputDataFormat?: string; /** * Required. The output Google Cloud Storage location. */ @@ -884,9 +888,10 @@ export namespace ml_v1 { /** * Optional. The machine learning framework Cloud ML Engine uses to train * this version of the model. Valid values are `TENSORFLOW`, `SCIKIT_LEARN`, - * and `XGBOOST`. If you do not specify a framework, Cloud ML Engine uses - * TensorFlow. If you choose `SCIKIT_LEARN` or `XGBOOST`, you must also set - * the runtime version of the model to 1.4 or greater. + * `XGBOOST`. If you do not specify a framework, Cloud ML Engine will + * analyze files in the deployment_uri to determine a framework. If you + * choose `SCIKIT_LEARN` or `XGBOOST`, you must also set the runtime version + * of the model to 1.4 or greater. */ framework?: string; /** diff --git a/src/apis/monitoring/v3.ts b/src/apis/monitoring/v3.ts index 0efec77b11a..26bfe7c736a 100644 --- a/src/apis/monitoring/v3.ts +++ b/src/apis/monitoring/v3.ts @@ -4573,7 +4573,7 @@ export namespace monitoring_v3 { /** * monitoring.projects.notificationChannels.create * @desc Creates a new notification channel, representing a single - * notification endpoint such as an email address, SMS number, or pagerduty + * notification endpoint such as an email address, SMS number, or PagerDuty * service. * @alias monitoring.projects.notificationChannels.create * @memberOf! () diff --git a/src/apis/people/v1.ts b/src/apis/people/v1.ts index 6bd839800ae..f1a93d498ae 100644 --- a/src/apis/people/v1.ts +++ b/src/apis/people/v1.ts @@ -326,12 +326,13 @@ export namespace people_v1 { export interface Schema$Date { /** * Day of month. Must be from 1 to 31 and valid for the year and month, or 0 - * if specifying a year/month where the day is not significant. + * if specifying a year by itself or a year and month where the day is not + * significant. */ day?: number; /** - * Month of year. Must be from 1 to 12, or 0 if specifying a date without a - * month. + * Month of year. Must be from 1 to 12, or 0 if specifying a year without a + * month and day. */ month?: number; /** diff --git a/src/apis/proximitybeacon/v1beta1.ts b/src/apis/proximitybeacon/v1beta1.ts index 1751d798eda..0e09f8956f2 100644 --- a/src/apis/proximitybeacon/v1beta1.ts +++ b/src/apis/proximitybeacon/v1beta1.ts @@ -262,12 +262,12 @@ export namespace proximitybeacon_v1beta1 { beaconName?: string; } /** - * Represents a whole calendar date, e.g. date of birth. The time of day and - * time zone are either specified elsewhere or are not significant. The date - * is relative to the Proleptic Gregorian Calendar. The day may be 0 to - * represent a year and month where the day is not significant, e.g. credit - * card expiration date. The year may be 0 to represent a month and day - * independent of year, e.g. anniversary date. Related types are + * Represents a whole calendar date, for example date of birth. The time of + * day and time zone are either specified elsewhere or are not significant. + * The date is relative to the Proleptic Gregorian Calendar. The day can be 0 + * to represent a year and month where the day is not significant, for example + * credit card expiration date. The year can be 0 to represent a month and day + * independent of year, for example anniversary date. Related types are * google.type.TimeOfDay and `google.protobuf.Timestamp`. */ export interface Schema$Date { diff --git a/src/apis/serviceconsumermanagement/v1.ts b/src/apis/serviceconsumermanagement/v1.ts index 2ccdf7874f2..593588ba980 100644 --- a/src/apis/serviceconsumermanagement/v1.ts +++ b/src/apis/serviceconsumermanagement/v1.ts @@ -198,32 +198,6 @@ export namespace serviceconsumermanagement_v1 { */ provider?: string; } - /** - * Authorization rule for API services. It specifies the permission(s) - * required for an API element for the overall API request to succeed. It is - * typically used to mark request message fields that contain the name of the - * resource and indicates the permissions that will be checked on that - * resource. For example: package google.storage.v1; message - * CopyObjectRequest { string source = 1 [ - * (google.api.authz).permissions = "storage.objects.get"]; string - * destination = 2 [ (google.api.authz).permissions = - * "storage.objects.create,storage.objects.update"]; } - */ - export interface Schema$AuthorizationRule { - /** - * The required permissions. The acceptable values vary depend on the - * authorization system used. For Google APIs, it should be a - * comma-separated Google IAM permission values. When multiple permissions - * are listed, the semantics is not defined by the system. Additional - * documentation must be provided manually. - */ - permissions?: string; - /** - * Selects the API elements to which this rule applies. Refer to selector - * for syntax details. - */ - selector?: string; - } /** * Configuration for an anthentication provider, including support for [JSON * Web Token @@ -782,123 +756,157 @@ export namespace serviceconsumermanagement_v1 { rules?: Schema$HttpRule[]; } /** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP REST - * API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and HTTP - * request body. The mapping is typically specified as an `google.api.http` - * annotation on the RPC method, see "google/api/annotations.proto" - * for details. The mapping consists of a field specifying the path template - * and method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET operation on a - * resource collection of messages: service Messaging { rpc + * # gRPC Transcoding gRPC Transcoding is a feature for mapping between a + * gRPC method and one or more HTTP REST endpoints. It allows developers to + * build a single API service that supports both gRPC APIs and REST APIs. Many + * systems, including [Google APIs](https://github.com/googleapis/googleapis), + * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC + * Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and + * [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and + * use it for large scale production services. `HttpRule` defines the schema + * of the gRPC/REST mapping. The mapping specifies how different portions of + * the gRPC request message are mapped to the URL path, URL query parameters, + * and HTTP request body. It also controls how the gRPC response message is + * mapped to the HTTP response body. `HttpRule` is typically specified as an + * `google.api.http` annotation on the gRPC method. Each mapping specifies a + * URL path template and an HTTP method. The path template may refer to one or + * more fields in the gRPC request message, as long as each field is a + * non-repeated field with a primitive (non-message) type. The path template + * controls how fields of the request message are mapped to the URL path. + * Example: service Messaging { rpc GetMessage(GetMessageRequest) + * returns (Message) { option (google.api.http) = { get: + * "/v1/{name=messages/*"}" }; } } message + * GetMessageRequest { string name = 1; // Mapped to URL path. } + * message Message { string text = 1; // The resource content. } + * This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC + * -----|----- `GET /v1/messages/123456` | `GetMessage(name: + * "messages/123456")` Any fields in the request message which are + * not bound by the path template automatically become HTTP query parameters + * if there is no HTTP request body. For example: service Messaging { rpc * GetMessage(GetMessageRequest) returns (Message) { option - * (google.api.http).get = - * "/v1/messages/{message_id}/{sub.subfield}"; } } message - * GetMessageRequest { message SubMessage { string subfield = 1; - * } string message_id = 1; // mapped to the URL SubMessage sub = - * 2; // `sub.subfield` is url-mapped } message Message { string - * text = 1; // content of the resource } The same http annotation can - * alternatively be expressed inside the `GRPC API Configuration` YAML file. - * http: rules: - selector: - * <proto_package_name>.Messaging.GetMessage get: - * /v1/messages/{message_id}/{sub.subfield} This definition enables an - * automatic, bidrectional mapping of HTTP JSON to RPC. Example: HTTP | RPC - * -----|----- `GET /v1/messages/123456/foo` | `GetMessage(message_id: - * "123456" sub: SubMessage(subfield: "foo"))` In - * general, not only fields but also field paths can be referenced from a path - * pattern. Fields mapped to the path pattern cannot be repeated and must have - * a primitive (non-message) type. Any fields in the request message which - * are not bound by the path pattern automatically become (optional) HTTP - * query parameters. Assume the following definition of the request message: - * service Messaging { rpc GetMessage(GetMessageRequest) returns - * (Message) { option (google.api.http).get = - * "/v1/messages/{message_id}"; } } message - * GetMessageRequest { message SubMessage { string subfield = 1; - * } string message_id = 1; // mapped to the URL int64 revision = - * 2; // becomes a parameter SubMessage sub = 3; // `sub.subfield` - * becomes a parameter } This enables a HTTP JSON to RPC mapping as - * below: HTTP | RPC -----|----- `GET + * (google.api.http) = { get:"/v1/messages/{message_id}" + * }; } } message GetMessageRequest { message SubMessage { + * string subfield = 1; } string message_id = 1; // Mapped to URL + * path. int64 revision = 2; // Mapped to URL query parameter + * `revision`. SubMessage sub = 3; // Mapped to URL query parameter + * `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: + * HTTP | gRPC -----|----- `GET * /v1/messages/123456?revision=2&sub.subfield=foo` | * `GetMessage(message_id: "123456" revision: 2 sub: * SubMessage(subfield: "foo"))` Note that fields which are mapped - * to HTTP parameters must have a primitive type or a repeated primitive type. - * Message types are not allowed. In the case of a repeated type, the - * parameter can be repeated in the URL, as in `...?param=A&param=B`. For - * HTTP method kinds which allow a request body, the `body` field specifies - * the mapping. Consider a REST update method on the message resource - * collection: service Messaging { rpc - * UpdateMessage(UpdateMessageRequest) returns (Message) { option - * (google.api.http) = { put: "/v1/messages/{message_id}" - * body: "message" }; } } message - * UpdateMessageRequest { string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body } The following HTTP - * JSON to RPC mapping is enabled, where the representation of the JSON in the - * request body is determined by protos JSON encoding: HTTP | RPC -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | - * `UpdateMessage(message_id: "123456" message { text: - * "Hi!" })` The special name `*` can be used in the body mapping - * to define that every field not bound by the path template should be mapped - * to the request body. This enables the following alternative definition of - * the update method: service Messaging { rpc - * UpdateMessage(Message) returns (Message) { option (google.api.http) - * = { put: "/v1/messages/{message_id}" body: - * "*" }; } } message Message { string - * message_id = 1; string text = 2; } The following HTTP JSON to - * RPC mapping is enabled: HTTP | RPC -----|----- `PUT /v1/messages/123456 { + * to URL query parameters must have a primitive type or a repeated primitive + * type or a non-repeated message type. In the case of a repeated type, the + * parameter can be repeated in the URL as `...?param=A&param=B`. In the + * case of a message type, each field of the message is mapped to a separate + * parameter, such as `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods + * that allow a request body, the `body` field specifies the mapping. Consider + * a REST update method on the message resource collection: service + * Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) + * { option (google.api.http) = { patch: + * "/v1/messages/{message_id}" body: "message" + * }; } } message UpdateMessageRequest { string message_id + * = 1; // mapped to the URL Message message = 2; // mapped to the + * body } The following HTTP JSON to RPC mapping is enabled, where the + * representation of the JSON in the request body is determined by protos JSON + * encoding: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { * "text": "Hi!" }` | `UpdateMessage(message_id: - * "123456" text: "Hi!")` Note that when using `*` in the - * body mapping, it is not possible to have HTTP parameters, as all fields not - * bound by the path end in the body. This makes this option more rarely used - * in practice of defining REST APIs. The common usage of `*` is in custom - * methods which don't use the URL at all for transferring data. It is - * possible to define multiple HTTP methods for one RPC by using the - * `additional_bindings` option. Example: service Messaging { rpc - * GetMessage(GetMessageRequest) returns (Message) { option - * (google.api.http) = { get: "/v1/messages/{message_id}" - * additional_bindings { get: + * "123456" message { text: "Hi!" })` The special name + * `*` can be used in the body mapping to define that every field not bound by + * the path template should be mapped to the request body. This enables the + * following alternative definition of the update method: service + * Messaging { rpc UpdateMessage(Message) returns (Message) { option + * (google.api.http) = { patch: + * "/v1/messages/{message_id}" body: "*" }; } } + * message Message { string message_id = 1; string text = 2; } + * The following HTTP JSON to RPC mapping is enabled: HTTP | gRPC -----|----- + * `PATCH /v1/messages/123456 { "text": "Hi!" }` | + * `UpdateMessage(message_id: "123456" text: "Hi!")` Note + * that when using `*` in the body mapping, it is not possible to have HTTP + * parameters, as all fields not bound by the path end in the body. This makes + * this option more rarely used in practice when defining REST APIs. The + * common usage of `*` is in custom methods which don't use the URL at all + * for transferring data. It is possible to define multiple HTTP methods for + * one RPC by using the `additional_bindings` option. Example: service + * Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http) = { get: + * "/v1/messages/{message_id}" additional_bindings { get: * "/v1/users/{user_id}/messages/{message_id}" } }; } } * message GetMessageRequest { string message_id = 1; string - * user_id = 2; } This enables the following two alternative HTTP JSON - * to RPC mappings: HTTP | RPC -----|----- `GET /v1/messages/123456` | + * user_id = 2; } This enables the following two alternative HTTP JSON to + * RPC mappings: HTTP | gRPC -----|----- `GET /v1/messages/123456` | * `GetMessage(message_id: "123456")` `GET * /v1/users/me/messages/123456` | `GetMessage(user_id: "me" - * message_id: "123456")` # Rules for HTTP mapping The rules for - * mapping HTTP path, query parameters, and body fields to the request message - * are as follows: 1. The `body` field specifies either `*` or a field path, - * or is omitted. If omitted, it indicates there is no HTTP request - * body. 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: (a) Matched in the URL - * template. (b) Covered by body (if body is `*`, everything except (a) - * fields; else everything under the body field) (c) All other - * fields. 3. URL query parameters found in the HTTP request are mapped to (c) - * fields. 4. Any body sent with an HTTP request can contain only (b) fields. - * The syntax of the path template is as follows: Template = + * message_id: "123456")` ## Rules for HTTP mapping 1. Leaf + * request fields (recursive expansion nested messages in the request message) + * are classified into three categories: - Fields referred by the path + * template. They are passed via the URL path. - Fields referred by the + * HttpRule.body. They are passed via the HTTP request body. - All + * other fields are passed via the URL query parameters, and the parameter + * name is the field path in the request message. A repeated field can be + * represented as multiple query parameters under the same name. 2. If + * HttpRule.body is "*", there is no URL query parameter, all fields + * are passed via URL path and HTTP request body. 3. If HttpRule.body is + * omitted, there is no HTTP request body, all fields are passed via URL + * path and URL query parameters. ### Path template syntax Template = * "/" Segments [ Verb ] ; Segments = Segment { "/" * Segment } ; Segment = "*" | "**" | LITERAL | * Variable ; Variable = "{" FieldPath [ "=" Segments * ] "}" ; FieldPath = IDENT { "." IDENT } ; Verb - * = ":" LITERAL ; The syntax `*` matches a single path segment. - * The syntax `**` matches zero or more path segments, which must be the last - * part of the path except the `Verb`. The syntax `LITERAL` matches literal - * text in the path. The syntax `Variable` matches part of the URL path as - * specified by its template. A variable template must not contain other - * variables. If a variable matches a single path segment, its template may be - * omitted, e.g. `{var}` is equivalent to `{var=*}`. If a variable contains - * exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, - * all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{var}`. If a variable contains one - * or more path segments, such as `"{var=foo/*}"` or - * `"{var=**}"`, when such a variable is expanded into a URL path, - * all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such - * variables show up in the Discovery Document as `{+var}`. NOTE: While the - * single segment variable matches the semantics of [RFC + * = ":" LITERAL ; The syntax `*` matches a single URL path + * segment. The syntax `**` matches zero or more URL path segments, which must + * be the last part of the URL path except the `Verb`. The syntax `Variable` + * matches part of the URL path as specified by its template. A variable + * template must not contain other variables. If a variable matches a single + * path segment, its template may be omitted, e.g. `{var}` is equivalent to + * `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If + * the `LITERAL` contains any reserved character, such characters should be + * percent-encoded before the matching. If a variable contains exactly one + * path segment, such as `"{var}"` or `"{var=*}"`, when + * such a variable is expanded into a URL path on the client side, all + * characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side + * does the reverse decoding. Such variables show up in the [Discovery + * Document](https://developers.google.com/discovery/v1/reference/apis) as + * `{var}`. If a variable contains multiple path segments, such as + * `"{var=foo/*}"` or `"{var=**}"`, when such a variable + * is expanded into a URL path on the client side, all characters except + * `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse + * decoding, except "%2F" and "%2f" are left unchanged. + * Such variables show up in the [Discovery + * Document](https://developers.google.com/discovery/v1/reference/apis) as + * `{+var}`. ## Using gRPC API Service Configuration gRPC API Service + * Configuration (service config) is a configuration language for configuring + * a gRPC service to become a user-facing product. The service config is + * simply the YAML representation of the `google.api.Service` proto message. + * As an alternative to annotating your proto file, you can configure gRPC + * transcoding in your service config YAML files. You do this by specifying a + * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same + * effect as the proto annotation. This can be particularly useful if you have + * a proto that is reused in multiple services. Note that any transcoding + * specified in the service config will override any matching transcoding + * configuration in the proto. Example: http: rules: # + * Selects a gRPC method and applies HttpRule to it. - selector: + * example.v1.Messaging.GetMessage get: + * /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC + * Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON + * conversion must follow the [proto3 + * specification](https://developers.google.com/protocol-buffers/docs/proto3#json). + * While the single segment variable follows the semantics of [RFC * 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String - * Expansion, the multi segment variable **does not** match RFC 6570 Reserved - * Expansion. The reason is that the Reserved Expansion does not expand - * special characters like `?` and `#`, which would lead to invalid URLs. - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. + * Expansion, the multi segment variable **does not** follow RFC 6570 + * Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion + * does not expand special characters like `?` and `#`, which would lead to + * invalid URLs. As the result, gRPC Transcoding uses a custom encoding for + * multi segment variables. The path variables **must not** refer to any + * repeated or mapped field, because client libraries are not capable of + * handling such variable expansion. The path variables **must not** capture + * the leading "/" character. The reason is that the most common use + * case "{var}" does not capture the leading "/" + * character. For consistency, all path variables must share the same + * behavior. Repeated message fields must not be mapped to URL query + * parameters, because no client library can support such complicated mapping. + * If an API needs to use a JSON array for request or response body, it can + * map the request or response body to a repeated field. However, some gRPC + * Transcoding implementations may not support this feature. */ export interface Schema$HttpRule { /** @@ -908,17 +916,11 @@ export namespace serviceconsumermanagement_v1 { */ additionalBindings?: Schema$HttpRule[]; /** - * Specifies the permission(s) required for an API element for the overall - * API request to succeed. It is typically used to mark request message - * fields that contain the name of the resource and indicates the - * permissions that will be checked on that resource. - */ - authorizations?: Schema$AuthorizationRule[]; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. + * The name of the request field whose value is mapped to the HTTP request + * body, or `*` for mapping all request fields not captured by the path + * pattern to the HTTP body, or omitted for not having any HTTP request + * body. NOTE: the referred field must be present at the top-level of the + * request message type. */ body?: string; /** @@ -929,73 +931,36 @@ export namespace serviceconsumermanagement_v1 { */ custom?: Schema$CustomHttpPattern; /** - * Used for deleting a resource. + * Maps to HTTP DELETE. Used for deleting a resource. */ delete?: string; /** - * Used for listing and getting information about resources. + * Maps to HTTP GET. Used for listing and getting information about + * resources. */ get?: string; /** - * Use this only for Scotty Requests. Do not use this for bytestream - * methods. For media support, add instead - * [][google.bytestream.RestByteStream] as an API to your configuration. - */ - mediaDownload?: Schema$MediaDownload; - /** - * Use this only for Scotty Requests. Do not use this for media support - * using Bytestream, add instead [][google.bytestream.RestByteStream] as an - * API to your configuration for Bytestream methods. - */ - mediaUpload?: Schema$MediaUpload; - /** - * Used for updating a resource. + * Maps to HTTP PATCH. Used for updating a resource. */ patch?: string; /** - * Used for creating a resource. + * Maps to HTTP POST. Used for creating a resource or performing an action. */ post?: string; /** - * Used for updating a resource. + * Maps to HTTP PUT. Used for replacing a resource. */ put?: string; /** * Optional. The name of the response field whose value is mapped to the - * HTTP body of response. Other response fields are ignored. When not set, - * the response message will be used as HTTP body of response. + * HTTP response body. When omitted, the entire response message will be + * used as the HTTP response body. NOTE: The referred field must be present + * at the top-level of the response message type. */ responseBody?: string; /** - * DO NOT USE. This is an experimental field. Optional. The REST collection - * name is by default derived from the URL pattern. If specified, this field - * overrides the default collection name. Example: rpc - * AddressesAggregatedList(AddressesAggregatedListRequest) returns - * (AddressesAggregatedListResponse) { option (google.api.http) = { - * get: "/v1/projects/{project_id}/aggregated/addresses" - * rest_collection: "projects.addresses" }; } This - * method has the automatically derived collection name - * "projects.aggregated". Because, semantically, this rpc is - * actually an operation on the "projects.addresses" collection, - * the `rest_collection` field is configured to override the derived - * collection name. - */ - restCollection?: string; - /** - * DO NOT USE. This is an experimental field. Optional. The rest method - * name is by default derived from the URL pattern. If specified, this field - * overrides the default method name. Example: rpc - * CreateResource(CreateResourceRequest) returns - * (CreateResourceResponse) { option (google.api.http) = { post: - * "/v1/resources", body: "resource", - * rest_method_name: "insert" }; } This method has the - * automatically derived rest method name "create", but for - * backwards compatibility with apiary, it is specified as insert. - */ - restMethodName?: string; - /** - * Selects methods to which this rule applies. Refer to selector for syntax - * details. + * Selects a method to which this rule applies. Refer to selector for + * syntax details. */ selector?: string; } @@ -1122,87 +1087,6 @@ export namespace serviceconsumermanagement_v1 { */ monitoredResource?: string; } - /** - * Defines the Media configuration for a service in case of a download. Use - * this only for Scotty Requests. Do not use this for media support using - * Bytestream, add instead [][google.bytestream.RestByteStream] as an API to - * your configuration for Bytestream methods. - */ - export interface Schema$MediaDownload { - /** - * A boolean that determines whether a notification for the completion of a - * download should be sent to the backend. - */ - completeNotification?: boolean; - /** - * DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED. Specify - * name of the download service if one is used for download. - */ - downloadService?: string; - /** - * Name of the Scotty dropzone to use for the current API. - */ - dropzone?: string; - /** - * Whether download is enabled. - */ - enabled?: boolean; - /** - * Optional maximum acceptable size for direct download. The size is - * specified in bytes. - */ - maxDirectDownloadSize?: string; - /** - * A boolean that determines if direct download from ESF should be used for - * download of this media. - */ - useDirectDownload?: boolean; - } - /** - * Defines the Media configuration for a service in case of an upload. Use - * this only for Scotty Requests. Do not use this for media support using - * Bytestream, add instead [][google.bytestream.RestByteStream] as an API to - * your configuration for Bytestream methods. - */ - export interface Schema$MediaUpload { - /** - * A boolean that determines whether a notification for the completion of an - * upload should be sent to the backend. These notifications will not be - * seen by the client and will not consume quota. - */ - completeNotification?: boolean; - /** - * Name of the Scotty dropzone to use for the current API. - */ - dropzone?: string; - /** - * Whether upload is enabled. - */ - enabled?: boolean; - /** - * Optional maximum acceptable size for an upload. The size is specified in - * bytes. - */ - maxSize?: string; - /** - * An array of mimetype patterns. Esf will only accept uploads that match - * one of the given patterns. - */ - mimeTypes?: string[]; - /** - * Whether to receive a notification for progress changes of media upload. - */ - progressNotification?: boolean; - /** - * Whether to receive a notification on the start of media upload. - */ - startNotification?: boolean; - /** - * DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED. Specify - * name of the upload service if one is used for upload. - */ - uploadService?: string; - } /** * Method represents a method of an API interface. */ @@ -1644,14 +1528,15 @@ export namespace serviceconsumermanagement_v1 { * defines a set of metrics. - For API calls, the quota.metric_rules maps * methods to metrics with corresponding costs. - The quota.limits defines * limits on the metrics, which will be used for quota checks at runtime. An - * example quota configuration in yaml format: quota: - name: - * apiWriteQpsPerProject metric: library.googleapis.com/write_calls - * unit: "1/min/{project}" # rate limit for consumer projects - * values: STANDARD: 10000 # The metric rules bind all methods - * to the read_calls metric, # except for the UpdateBook and DeleteBook - * methods. These two methods # are mapped to the write_calls metric, - * with the UpdateBook method # consuming at twice rate as the DeleteBook - * method. metric_rules: - selector: "*" metric_costs: + * example quota configuration in yaml format: quota: limits: - + * name: apiWriteQpsPerProject metric: + * library.googleapis.com/write_calls unit: "1/min/{project}" + * # rate limit for consumer projects values: STANDARD: 10000 + * # The metric rules bind all methods to the read_calls metric, # except + * for the UpdateBook and DeleteBook methods. These two methods # are + * mapped to the write_calls metric, with the UpdateBook method # + * consuming at twice rate as the DeleteBook method. metric_rules: - + * selector: "*" metric_costs: * library.googleapis.com/read_calls: 1 - selector: * google.example.library.v1.LibraryService.UpdateBook metric_costs: * library.googleapis.com/write_calls: 2 - selector: diff --git a/src/apis/servicecontrol/v1.ts b/src/apis/servicecontrol/v1.ts index 7b871874012..3500b1a7281 100644 --- a/src/apis/servicecontrol/v1.ts +++ b/src/apis/servicecontrol/v1.ts @@ -565,8 +565,7 @@ export namespace servicecontrol_v1 { /** * A common proto for logging HTTP requests. Only contains semantics defined * by the HTTP specification. Product-specific logging information MUST be - * defined in a separate message. This is an exact copy of HttpRequest - * message defined in Stackdriver. + * defined in a separate message. */ export interface Schema$HttpRequest { /** @@ -621,7 +620,7 @@ export namespace servicecontrol_v1 { */ requestSize?: string; /** - * The scheme (http, https), the host name, the path and the query portion + * The scheme (http, https), the host name, the path, and the query portion * of the URL that was requested. Example: * `"http://example.com/some/info?color=red"`. */ @@ -637,7 +636,8 @@ export namespace servicecontrol_v1 { */ serverIp?: string; /** - * The response code indicating the status of response. Examples: 200, 404. + * The response code indicating the status of the response. Examples: 200, + * 404. */ status?: number; /** @@ -724,8 +724,8 @@ export namespace servicecontrol_v1 { timestamp?: string; /** * Optional. Resource name of the trace associated with the log entry, if - * any. If it contains a relative resource name, the name is assumed to be - * relative to `//tracing.googleapis.com`. Example: + * any. If this field contains a relative resource name, you can assume the + * name is relative to `//tracing.googleapis.com`. Example: * `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` */ trace?: string; diff --git a/src/apis/servicemanagement/v1.ts b/src/apis/servicemanagement/v1.ts index 30d035fb18f..444bb62c2ce 100644 --- a/src/apis/servicemanagement/v1.ts +++ b/src/apis/servicemanagement/v1.ts @@ -1023,123 +1023,157 @@ export namespace servicemanagement_v1 { rules?: Schema$HttpRule[]; } /** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP REST - * API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and HTTP - * request body. The mapping is typically specified as an `google.api.http` - * annotation on the RPC method, see "google/api/annotations.proto" - * for details. The mapping consists of a field specifying the path template - * and method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET operation on a - * resource collection of messages: service Messaging { rpc + * # gRPC Transcoding gRPC Transcoding is a feature for mapping between a + * gRPC method and one or more HTTP REST endpoints. It allows developers to + * build a single API service that supports both gRPC APIs and REST APIs. Many + * systems, including [Google APIs](https://github.com/googleapis/googleapis), + * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC + * Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and + * [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and + * use it for large scale production services. `HttpRule` defines the schema + * of the gRPC/REST mapping. The mapping specifies how different portions of + * the gRPC request message are mapped to the URL path, URL query parameters, + * and HTTP request body. It also controls how the gRPC response message is + * mapped to the HTTP response body. `HttpRule` is typically specified as an + * `google.api.http` annotation on the gRPC method. Each mapping specifies a + * URL path template and an HTTP method. The path template may refer to one or + * more fields in the gRPC request message, as long as each field is a + * non-repeated field with a primitive (non-message) type. The path template + * controls how fields of the request message are mapped to the URL path. + * Example: service Messaging { rpc GetMessage(GetMessageRequest) + * returns (Message) { option (google.api.http) = { get: + * "/v1/{name=messages/*"}" }; } } message + * GetMessageRequest { string name = 1; // Mapped to URL path. } + * message Message { string text = 1; // The resource content. } + * This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC + * -----|----- `GET /v1/messages/123456` | `GetMessage(name: + * "messages/123456")` Any fields in the request message which are + * not bound by the path template automatically become HTTP query parameters + * if there is no HTTP request body. For example: service Messaging { rpc * GetMessage(GetMessageRequest) returns (Message) { option - * (google.api.http).get = - * "/v1/messages/{message_id}/{sub.subfield}"; } } message - * GetMessageRequest { message SubMessage { string subfield = 1; - * } string message_id = 1; // mapped to the URL SubMessage sub = - * 2; // `sub.subfield` is url-mapped } message Message { string - * text = 1; // content of the resource } The same http annotation can - * alternatively be expressed inside the `GRPC API Configuration` YAML file. - * http: rules: - selector: - * <proto_package_name>.Messaging.GetMessage get: - * /v1/messages/{message_id}/{sub.subfield} This definition enables an - * automatic, bidrectional mapping of HTTP JSON to RPC. Example: HTTP | RPC - * -----|----- `GET /v1/messages/123456/foo` | `GetMessage(message_id: - * "123456" sub: SubMessage(subfield: "foo"))` In - * general, not only fields but also field paths can be referenced from a path - * pattern. Fields mapped to the path pattern cannot be repeated and must have - * a primitive (non-message) type. Any fields in the request message which - * are not bound by the path pattern automatically become (optional) HTTP - * query parameters. Assume the following definition of the request message: - * service Messaging { rpc GetMessage(GetMessageRequest) returns - * (Message) { option (google.api.http).get = - * "/v1/messages/{message_id}"; } } message - * GetMessageRequest { message SubMessage { string subfield = 1; - * } string message_id = 1; // mapped to the URL int64 revision = - * 2; // becomes a parameter SubMessage sub = 3; // `sub.subfield` - * becomes a parameter } This enables a HTTP JSON to RPC mapping as - * below: HTTP | RPC -----|----- `GET + * (google.api.http) = { get:"/v1/messages/{message_id}" + * }; } } message GetMessageRequest { message SubMessage { + * string subfield = 1; } string message_id = 1; // Mapped to URL + * path. int64 revision = 2; // Mapped to URL query parameter + * `revision`. SubMessage sub = 3; // Mapped to URL query parameter + * `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: + * HTTP | gRPC -----|----- `GET * /v1/messages/123456?revision=2&sub.subfield=foo` | * `GetMessage(message_id: "123456" revision: 2 sub: * SubMessage(subfield: "foo"))` Note that fields which are mapped - * to HTTP parameters must have a primitive type or a repeated primitive type. - * Message types are not allowed. In the case of a repeated type, the - * parameter can be repeated in the URL, as in `...?param=A&param=B`. For - * HTTP method kinds which allow a request body, the `body` field specifies - * the mapping. Consider a REST update method on the message resource - * collection: service Messaging { rpc - * UpdateMessage(UpdateMessageRequest) returns (Message) { option - * (google.api.http) = { put: "/v1/messages/{message_id}" - * body: "message" }; } } message - * UpdateMessageRequest { string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body } The following HTTP - * JSON to RPC mapping is enabled, where the representation of the JSON in the - * request body is determined by protos JSON encoding: HTTP | RPC -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | - * `UpdateMessage(message_id: "123456" message { text: - * "Hi!" })` The special name `*` can be used in the body mapping - * to define that every field not bound by the path template should be mapped - * to the request body. This enables the following alternative definition of - * the update method: service Messaging { rpc - * UpdateMessage(Message) returns (Message) { option (google.api.http) - * = { put: "/v1/messages/{message_id}" body: - * "*" }; } } message Message { string - * message_id = 1; string text = 2; } The following HTTP JSON to - * RPC mapping is enabled: HTTP | RPC -----|----- `PUT /v1/messages/123456 { + * to URL query parameters must have a primitive type or a repeated primitive + * type or a non-repeated message type. In the case of a repeated type, the + * parameter can be repeated in the URL as `...?param=A&param=B`. In the + * case of a message type, each field of the message is mapped to a separate + * parameter, such as `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods + * that allow a request body, the `body` field specifies the mapping. Consider + * a REST update method on the message resource collection: service + * Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) + * { option (google.api.http) = { patch: + * "/v1/messages/{message_id}" body: "message" + * }; } } message UpdateMessageRequest { string message_id + * = 1; // mapped to the URL Message message = 2; // mapped to the + * body } The following HTTP JSON to RPC mapping is enabled, where the + * representation of the JSON in the request body is determined by protos JSON + * encoding: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { * "text": "Hi!" }` | `UpdateMessage(message_id: - * "123456" text: "Hi!")` Note that when using `*` in the - * body mapping, it is not possible to have HTTP parameters, as all fields not - * bound by the path end in the body. This makes this option more rarely used - * in practice of defining REST APIs. The common usage of `*` is in custom - * methods which don't use the URL at all for transferring data. It is - * possible to define multiple HTTP methods for one RPC by using the - * `additional_bindings` option. Example: service Messaging { rpc - * GetMessage(GetMessageRequest) returns (Message) { option - * (google.api.http) = { get: "/v1/messages/{message_id}" - * additional_bindings { get: + * "123456" message { text: "Hi!" })` The special name + * `*` can be used in the body mapping to define that every field not bound by + * the path template should be mapped to the request body. This enables the + * following alternative definition of the update method: service + * Messaging { rpc UpdateMessage(Message) returns (Message) { option + * (google.api.http) = { patch: + * "/v1/messages/{message_id}" body: "*" }; } } + * message Message { string message_id = 1; string text = 2; } + * The following HTTP JSON to RPC mapping is enabled: HTTP | gRPC -----|----- + * `PATCH /v1/messages/123456 { "text": "Hi!" }` | + * `UpdateMessage(message_id: "123456" text: "Hi!")` Note + * that when using `*` in the body mapping, it is not possible to have HTTP + * parameters, as all fields not bound by the path end in the body. This makes + * this option more rarely used in practice when defining REST APIs. The + * common usage of `*` is in custom methods which don't use the URL at all + * for transferring data. It is possible to define multiple HTTP methods for + * one RPC by using the `additional_bindings` option. Example: service + * Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http) = { get: + * "/v1/messages/{message_id}" additional_bindings { get: * "/v1/users/{user_id}/messages/{message_id}" } }; } } * message GetMessageRequest { string message_id = 1; string - * user_id = 2; } This enables the following two alternative HTTP JSON - * to RPC mappings: HTTP | RPC -----|----- `GET /v1/messages/123456` | + * user_id = 2; } This enables the following two alternative HTTP JSON to + * RPC mappings: HTTP | gRPC -----|----- `GET /v1/messages/123456` | * `GetMessage(message_id: "123456")` `GET * /v1/users/me/messages/123456` | `GetMessage(user_id: "me" - * message_id: "123456")` # Rules for HTTP mapping The rules for - * mapping HTTP path, query parameters, and body fields to the request message - * are as follows: 1. The `body` field specifies either `*` or a field path, - * or is omitted. If omitted, it indicates there is no HTTP request - * body. 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: (a) Matched in the URL - * template. (b) Covered by body (if body is `*`, everything except (a) - * fields; else everything under the body field) (c) All other - * fields. 3. URL query parameters found in the HTTP request are mapped to (c) - * fields. 4. Any body sent with an HTTP request can contain only (b) fields. - * The syntax of the path template is as follows: Template = + * message_id: "123456")` ## Rules for HTTP mapping 1. Leaf + * request fields (recursive expansion nested messages in the request message) + * are classified into three categories: - Fields referred by the path + * template. They are passed via the URL path. - Fields referred by the + * HttpRule.body. They are passed via the HTTP request body. - All + * other fields are passed via the URL query parameters, and the parameter + * name is the field path in the request message. A repeated field can be + * represented as multiple query parameters under the same name. 2. If + * HttpRule.body is "*", there is no URL query parameter, all fields + * are passed via URL path and HTTP request body. 3. If HttpRule.body is + * omitted, there is no HTTP request body, all fields are passed via URL + * path and URL query parameters. ### Path template syntax Template = * "/" Segments [ Verb ] ; Segments = Segment { "/" * Segment } ; Segment = "*" | "**" | LITERAL | * Variable ; Variable = "{" FieldPath [ "=" Segments * ] "}" ; FieldPath = IDENT { "." IDENT } ; Verb - * = ":" LITERAL ; The syntax `*` matches a single path segment. - * The syntax `**` matches zero or more path segments, which must be the last - * part of the path except the `Verb`. The syntax `LITERAL` matches literal - * text in the path. The syntax `Variable` matches part of the URL path as - * specified by its template. A variable template must not contain other - * variables. If a variable matches a single path segment, its template may be - * omitted, e.g. `{var}` is equivalent to `{var=*}`. If a variable contains - * exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, - * all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{var}`. If a variable contains one - * or more path segments, such as `"{var=foo/*}"` or - * `"{var=**}"`, when such a variable is expanded into a URL path, - * all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such - * variables show up in the Discovery Document as `{+var}`. NOTE: While the - * single segment variable matches the semantics of [RFC + * = ":" LITERAL ; The syntax `*` matches a single URL path + * segment. The syntax `**` matches zero or more URL path segments, which must + * be the last part of the URL path except the `Verb`. The syntax `Variable` + * matches part of the URL path as specified by its template. A variable + * template must not contain other variables. If a variable matches a single + * path segment, its template may be omitted, e.g. `{var}` is equivalent to + * `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If + * the `LITERAL` contains any reserved character, such characters should be + * percent-encoded before the matching. If a variable contains exactly one + * path segment, such as `"{var}"` or `"{var=*}"`, when + * such a variable is expanded into a URL path on the client side, all + * characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side + * does the reverse decoding. Such variables show up in the [Discovery + * Document](https://developers.google.com/discovery/v1/reference/apis) as + * `{var}`. If a variable contains multiple path segments, such as + * `"{var=foo/*}"` or `"{var=**}"`, when such a variable + * is expanded into a URL path on the client side, all characters except + * `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse + * decoding, except "%2F" and "%2f" are left unchanged. + * Such variables show up in the [Discovery + * Document](https://developers.google.com/discovery/v1/reference/apis) as + * `{+var}`. ## Using gRPC API Service Configuration gRPC API Service + * Configuration (service config) is a configuration language for configuring + * a gRPC service to become a user-facing product. The service config is + * simply the YAML representation of the `google.api.Service` proto message. + * As an alternative to annotating your proto file, you can configure gRPC + * transcoding in your service config YAML files. You do this by specifying a + * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same + * effect as the proto annotation. This can be particularly useful if you have + * a proto that is reused in multiple services. Note that any transcoding + * specified in the service config will override any matching transcoding + * configuration in the proto. Example: http: rules: # + * Selects a gRPC method and applies HttpRule to it. - selector: + * example.v1.Messaging.GetMessage get: + * /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC + * Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON + * conversion must follow the [proto3 + * specification](https://developers.google.com/protocol-buffers/docs/proto3#json). + * While the single segment variable follows the semantics of [RFC * 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String - * Expansion, the multi segment variable **does not** match RFC 6570 Reserved - * Expansion. The reason is that the Reserved Expansion does not expand - * special characters like `?` and `#`, which would lead to invalid URLs. - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. + * Expansion, the multi segment variable **does not** follow RFC 6570 + * Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion + * does not expand special characters like `?` and `#`, which would lead to + * invalid URLs. As the result, gRPC Transcoding uses a custom encoding for + * multi segment variables. The path variables **must not** refer to any + * repeated or mapped field, because client libraries are not capable of + * handling such variable expansion. The path variables **must not** capture + * the leading "/" character. The reason is that the most common use + * case "{var}" does not capture the leading "/" + * character. For consistency, all path variables must share the same + * behavior. Repeated message fields must not be mapped to URL query + * parameters, because no client library can support such complicated mapping. + * If an API needs to use a JSON array for request or response body, it can + * map the request or response body to a repeated field. However, some gRPC + * Transcoding implementations may not support this feature. */ export interface Schema$HttpRule { /** @@ -1149,10 +1183,11 @@ export namespace servicemanagement_v1 { */ additionalBindings?: Schema$HttpRule[]; /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. + * The name of the request field whose value is mapped to the HTTP request + * body, or `*` for mapping all request fields not captured by the path + * pattern to the HTTP body, or omitted for not having any HTTP request + * body. NOTE: the referred field must be present at the top-level of the + * request message type. */ body?: string; /** @@ -1163,46 +1198,36 @@ export namespace servicemanagement_v1 { */ custom?: Schema$CustomHttpPattern; /** - * Used for deleting a resource. + * Maps to HTTP DELETE. Used for deleting a resource. */ delete?: string; /** - * Used for listing and getting information about resources. + * Maps to HTTP GET. Used for listing and getting information about + * resources. */ get?: string; /** - * Use this only for Scotty Requests. Do not use this for bytestream - * methods. For media support, add instead - * [][google.bytestream.RestByteStream] as an API to your configuration. - */ - mediaDownload?: Schema$MediaDownload; - /** - * Use this only for Scotty Requests. Do not use this for media support - * using Bytestream, add instead [][google.bytestream.RestByteStream] as an - * API to your configuration for Bytestream methods. - */ - mediaUpload?: Schema$MediaUpload; - /** - * Used for updating a resource. + * Maps to HTTP PATCH. Used for updating a resource. */ patch?: string; /** - * Used for creating a resource. + * Maps to HTTP POST. Used for creating a resource or performing an action. */ post?: string; /** - * Used for updating a resource. + * Maps to HTTP PUT. Used for replacing a resource. */ put?: string; /** * Optional. The name of the response field whose value is mapped to the - * HTTP body of response. Other response fields are ignored. When not set, - * the response message will be used as HTTP body of response. + * HTTP response body. When omitted, the entire response message will be + * used as the HTTP response body. NOTE: The referred field must be present + * at the top-level of the response message type. */ responseBody?: string; /** - * Selects methods to which this rule applies. Refer to selector for syntax - * details. + * Selects a method to which this rule applies. Refer to selector for + * syntax details. */ selector?: string; } @@ -1370,87 +1395,6 @@ export namespace servicemanagement_v1 { */ serviceName?: string; } - /** - * Defines the Media configuration for a service in case of a download. Use - * this only for Scotty Requests. Do not use this for media support using - * Bytestream, add instead [][google.bytestream.RestByteStream] as an API to - * your configuration for Bytestream methods. - */ - export interface Schema$MediaDownload { - /** - * A boolean that determines whether a notification for the completion of a - * download should be sent to the backend. - */ - completeNotification?: boolean; - /** - * DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED. Specify - * name of the download service if one is used for download. - */ - downloadService?: string; - /** - * Name of the Scotty dropzone to use for the current API. - */ - dropzone?: string; - /** - * Whether download is enabled. - */ - enabled?: boolean; - /** - * Optional maximum acceptable size for direct download. The size is - * specified in bytes. - */ - maxDirectDownloadSize?: string; - /** - * A boolean that determines if direct download from ESF should be used for - * download of this media. - */ - useDirectDownload?: boolean; - } - /** - * Defines the Media configuration for a service in case of an upload. Use - * this only for Scotty Requests. Do not use this for media support using - * Bytestream, add instead [][google.bytestream.RestByteStream] as an API to - * your configuration for Bytestream methods. - */ - export interface Schema$MediaUpload { - /** - * A boolean that determines whether a notification for the completion of an - * upload should be sent to the backend. These notifications will not be - * seen by the client and will not consume quota. - */ - completeNotification?: boolean; - /** - * Name of the Scotty dropzone to use for the current API. - */ - dropzone?: string; - /** - * Whether upload is enabled. - */ - enabled?: boolean; - /** - * Optional maximum acceptable size for an upload. The size is specified in - * bytes. - */ - maxSize?: string; - /** - * An array of mimetype patterns. Esf will only accept uploads that match - * one of the given patterns. - */ - mimeTypes?: string[]; - /** - * Whether to receive a notification for progress changes of media upload. - */ - progressNotification?: boolean; - /** - * Whether to receive a notification on the start of media upload. - */ - startNotification?: boolean; - /** - * DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED. Specify - * name of the upload service if one is used for upload. - */ - uploadService?: string; - } /** * Method represents a method of an API interface. */ @@ -1945,14 +1889,15 @@ export namespace servicemanagement_v1 { * defines a set of metrics. - For API calls, the quota.metric_rules maps * methods to metrics with corresponding costs. - The quota.limits defines * limits on the metrics, which will be used for quota checks at runtime. An - * example quota configuration in yaml format: quota: - name: - * apiWriteQpsPerProject metric: library.googleapis.com/write_calls - * unit: "1/min/{project}" # rate limit for consumer projects - * values: STANDARD: 10000 # The metric rules bind all methods - * to the read_calls metric, # except for the UpdateBook and DeleteBook - * methods. These two methods # are mapped to the write_calls metric, - * with the UpdateBook method # consuming at twice rate as the DeleteBook - * method. metric_rules: - selector: "*" metric_costs: + * example quota configuration in yaml format: quota: limits: - + * name: apiWriteQpsPerProject metric: + * library.googleapis.com/write_calls unit: "1/min/{project}" + * # rate limit for consumer projects values: STANDARD: 10000 + * # The metric rules bind all methods to the read_calls metric, # except + * for the UpdateBook and DeleteBook methods. These two methods # are + * mapped to the write_calls metric, with the UpdateBook method # + * consuming at twice rate as the DeleteBook method. metric_rules: - + * selector: "*" metric_costs: * library.googleapis.com/read_calls: 1 - selector: * google.example.library.v1.LibraryService.UpdateBook metric_costs: * library.googleapis.com/write_calls: 2 - selector: diff --git a/src/apis/serviceusage/v1.ts b/src/apis/serviceusage/v1.ts index 4decc57319d..cac7b3e41e5 100644 --- a/src/apis/serviceusage/v1.ts +++ b/src/apis/serviceusage/v1.ts @@ -184,32 +184,6 @@ export namespace serviceusage_v1 { */ provider?: string; } - /** - * Authorization rule for API services. It specifies the permission(s) - * required for an API element for the overall API request to succeed. It is - * typically used to mark request message fields that contain the name of the - * resource and indicates the permissions that will be checked on that - * resource. For example: package google.storage.v1; message - * CopyObjectRequest { string source = 1 [ - * (google.api.authz).permissions = "storage.objects.get"]; string - * destination = 2 [ (google.api.authz).permissions = - * "storage.objects.create,storage.objects.update"]; } - */ - export interface Schema$AuthorizationRule { - /** - * The required permissions. The acceptable values vary depend on the - * authorization system used. For Google APIs, it should be a - * comma-separated Google IAM permission values. When multiple permissions - * are listed, the semantics is not defined by the system. Additional - * documentation must be provided manually. - */ - permissions?: string; - /** - * Selects the API elements to which this rule applies. Refer to selector - * for syntax details. - */ - selector?: string; - } /** * Configuration for an anthentication provider, including support for [JSON * Web Token @@ -1054,123 +1028,157 @@ export namespace serviceusage_v1 { rules?: Schema$HttpRule[]; } /** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP REST - * API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and HTTP - * request body. The mapping is typically specified as an `google.api.http` - * annotation on the RPC method, see "google/api/annotations.proto" - * for details. The mapping consists of a field specifying the path template - * and method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET operation on a - * resource collection of messages: service Messaging { rpc + * # gRPC Transcoding gRPC Transcoding is a feature for mapping between a + * gRPC method and one or more HTTP REST endpoints. It allows developers to + * build a single API service that supports both gRPC APIs and REST APIs. Many + * systems, including [Google APIs](https://github.com/googleapis/googleapis), + * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC + * Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and + * [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and + * use it for large scale production services. `HttpRule` defines the schema + * of the gRPC/REST mapping. The mapping specifies how different portions of + * the gRPC request message are mapped to the URL path, URL query parameters, + * and HTTP request body. It also controls how the gRPC response message is + * mapped to the HTTP response body. `HttpRule` is typically specified as an + * `google.api.http` annotation on the gRPC method. Each mapping specifies a + * URL path template and an HTTP method. The path template may refer to one or + * more fields in the gRPC request message, as long as each field is a + * non-repeated field with a primitive (non-message) type. The path template + * controls how fields of the request message are mapped to the URL path. + * Example: service Messaging { rpc GetMessage(GetMessageRequest) + * returns (Message) { option (google.api.http) = { get: + * "/v1/{name=messages/*"}" }; } } message + * GetMessageRequest { string name = 1; // Mapped to URL path. } + * message Message { string text = 1; // The resource content. } + * This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC + * -----|----- `GET /v1/messages/123456` | `GetMessage(name: + * "messages/123456")` Any fields in the request message which are + * not bound by the path template automatically become HTTP query parameters + * if there is no HTTP request body. For example: service Messaging { rpc * GetMessage(GetMessageRequest) returns (Message) { option - * (google.api.http).get = - * "/v1/messages/{message_id}/{sub.subfield}"; } } message - * GetMessageRequest { message SubMessage { string subfield = 1; - * } string message_id = 1; // mapped to the URL SubMessage sub = - * 2; // `sub.subfield` is url-mapped } message Message { string - * text = 1; // content of the resource } The same http annotation can - * alternatively be expressed inside the `GRPC API Configuration` YAML file. - * http: rules: - selector: - * <proto_package_name>.Messaging.GetMessage get: - * /v1/messages/{message_id}/{sub.subfield} This definition enables an - * automatic, bidrectional mapping of HTTP JSON to RPC. Example: HTTP | RPC - * -----|----- `GET /v1/messages/123456/foo` | `GetMessage(message_id: - * "123456" sub: SubMessage(subfield: "foo"))` In - * general, not only fields but also field paths can be referenced from a path - * pattern. Fields mapped to the path pattern cannot be repeated and must have - * a primitive (non-message) type. Any fields in the request message which - * are not bound by the path pattern automatically become (optional) HTTP - * query parameters. Assume the following definition of the request message: - * service Messaging { rpc GetMessage(GetMessageRequest) returns - * (Message) { option (google.api.http).get = - * "/v1/messages/{message_id}"; } } message - * GetMessageRequest { message SubMessage { string subfield = 1; - * } string message_id = 1; // mapped to the URL int64 revision = - * 2; // becomes a parameter SubMessage sub = 3; // `sub.subfield` - * becomes a parameter } This enables a HTTP JSON to RPC mapping as - * below: HTTP | RPC -----|----- `GET + * (google.api.http) = { get:"/v1/messages/{message_id}" + * }; } } message GetMessageRequest { message SubMessage { + * string subfield = 1; } string message_id = 1; // Mapped to URL + * path. int64 revision = 2; // Mapped to URL query parameter + * `revision`. SubMessage sub = 3; // Mapped to URL query parameter + * `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: + * HTTP | gRPC -----|----- `GET * /v1/messages/123456?revision=2&sub.subfield=foo` | * `GetMessage(message_id: "123456" revision: 2 sub: * SubMessage(subfield: "foo"))` Note that fields which are mapped - * to HTTP parameters must have a primitive type or a repeated primitive type. - * Message types are not allowed. In the case of a repeated type, the - * parameter can be repeated in the URL, as in `...?param=A&param=B`. For - * HTTP method kinds which allow a request body, the `body` field specifies - * the mapping. Consider a REST update method on the message resource - * collection: service Messaging { rpc - * UpdateMessage(UpdateMessageRequest) returns (Message) { option - * (google.api.http) = { put: "/v1/messages/{message_id}" - * body: "message" }; } } message - * UpdateMessageRequest { string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body } The following HTTP - * JSON to RPC mapping is enabled, where the representation of the JSON in the - * request body is determined by protos JSON encoding: HTTP | RPC -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | - * `UpdateMessage(message_id: "123456" message { text: - * "Hi!" })` The special name `*` can be used in the body mapping - * to define that every field not bound by the path template should be mapped - * to the request body. This enables the following alternative definition of - * the update method: service Messaging { rpc - * UpdateMessage(Message) returns (Message) { option (google.api.http) - * = { put: "/v1/messages/{message_id}" body: - * "*" }; } } message Message { string - * message_id = 1; string text = 2; } The following HTTP JSON to - * RPC mapping is enabled: HTTP | RPC -----|----- `PUT /v1/messages/123456 { + * to URL query parameters must have a primitive type or a repeated primitive + * type or a non-repeated message type. In the case of a repeated type, the + * parameter can be repeated in the URL as `...?param=A&param=B`. In the + * case of a message type, each field of the message is mapped to a separate + * parameter, such as `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods + * that allow a request body, the `body` field specifies the mapping. Consider + * a REST update method on the message resource collection: service + * Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) + * { option (google.api.http) = { patch: + * "/v1/messages/{message_id}" body: "message" + * }; } } message UpdateMessageRequest { string message_id + * = 1; // mapped to the URL Message message = 2; // mapped to the + * body } The following HTTP JSON to RPC mapping is enabled, where the + * representation of the JSON in the request body is determined by protos JSON + * encoding: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { * "text": "Hi!" }` | `UpdateMessage(message_id: - * "123456" text: "Hi!")` Note that when using `*` in the - * body mapping, it is not possible to have HTTP parameters, as all fields not - * bound by the path end in the body. This makes this option more rarely used - * in practice of defining REST APIs. The common usage of `*` is in custom - * methods which don't use the URL at all for transferring data. It is - * possible to define multiple HTTP methods for one RPC by using the - * `additional_bindings` option. Example: service Messaging { rpc - * GetMessage(GetMessageRequest) returns (Message) { option - * (google.api.http) = { get: "/v1/messages/{message_id}" - * additional_bindings { get: + * "123456" message { text: "Hi!" })` The special name + * `*` can be used in the body mapping to define that every field not bound by + * the path template should be mapped to the request body. This enables the + * following alternative definition of the update method: service + * Messaging { rpc UpdateMessage(Message) returns (Message) { option + * (google.api.http) = { patch: + * "/v1/messages/{message_id}" body: "*" }; } } + * message Message { string message_id = 1; string text = 2; } + * The following HTTP JSON to RPC mapping is enabled: HTTP | gRPC -----|----- + * `PATCH /v1/messages/123456 { "text": "Hi!" }` | + * `UpdateMessage(message_id: "123456" text: "Hi!")` Note + * that when using `*` in the body mapping, it is not possible to have HTTP + * parameters, as all fields not bound by the path end in the body. This makes + * this option more rarely used in practice when defining REST APIs. The + * common usage of `*` is in custom methods which don't use the URL at all + * for transferring data. It is possible to define multiple HTTP methods for + * one RPC by using the `additional_bindings` option. Example: service + * Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http) = { get: + * "/v1/messages/{message_id}" additional_bindings { get: * "/v1/users/{user_id}/messages/{message_id}" } }; } } * message GetMessageRequest { string message_id = 1; string - * user_id = 2; } This enables the following two alternative HTTP JSON - * to RPC mappings: HTTP | RPC -----|----- `GET /v1/messages/123456` | + * user_id = 2; } This enables the following two alternative HTTP JSON to + * RPC mappings: HTTP | gRPC -----|----- `GET /v1/messages/123456` | * `GetMessage(message_id: "123456")` `GET * /v1/users/me/messages/123456` | `GetMessage(user_id: "me" - * message_id: "123456")` # Rules for HTTP mapping The rules for - * mapping HTTP path, query parameters, and body fields to the request message - * are as follows: 1. The `body` field specifies either `*` or a field path, - * or is omitted. If omitted, it indicates there is no HTTP request - * body. 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: (a) Matched in the URL - * template. (b) Covered by body (if body is `*`, everything except (a) - * fields; else everything under the body field) (c) All other - * fields. 3. URL query parameters found in the HTTP request are mapped to (c) - * fields. 4. Any body sent with an HTTP request can contain only (b) fields. - * The syntax of the path template is as follows: Template = + * message_id: "123456")` ## Rules for HTTP mapping 1. Leaf + * request fields (recursive expansion nested messages in the request message) + * are classified into three categories: - Fields referred by the path + * template. They are passed via the URL path. - Fields referred by the + * HttpRule.body. They are passed via the HTTP request body. - All + * other fields are passed via the URL query parameters, and the parameter + * name is the field path in the request message. A repeated field can be + * represented as multiple query parameters under the same name. 2. If + * HttpRule.body is "*", there is no URL query parameter, all fields + * are passed via URL path and HTTP request body. 3. If HttpRule.body is + * omitted, there is no HTTP request body, all fields are passed via URL + * path and URL query parameters. ### Path template syntax Template = * "/" Segments [ Verb ] ; Segments = Segment { "/" * Segment } ; Segment = "*" | "**" | LITERAL | * Variable ; Variable = "{" FieldPath [ "=" Segments * ] "}" ; FieldPath = IDENT { "." IDENT } ; Verb - * = ":" LITERAL ; The syntax `*` matches a single path segment. - * The syntax `**` matches zero or more path segments, which must be the last - * part of the path except the `Verb`. The syntax `LITERAL` matches literal - * text in the path. The syntax `Variable` matches part of the URL path as - * specified by its template. A variable template must not contain other - * variables. If a variable matches a single path segment, its template may be - * omitted, e.g. `{var}` is equivalent to `{var=*}`. If a variable contains - * exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, - * all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{var}`. If a variable contains one - * or more path segments, such as `"{var=foo/*}"` or - * `"{var=**}"`, when such a variable is expanded into a URL path, - * all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such - * variables show up in the Discovery Document as `{+var}`. NOTE: While the - * single segment variable matches the semantics of [RFC + * = ":" LITERAL ; The syntax `*` matches a single URL path + * segment. The syntax `**` matches zero or more URL path segments, which must + * be the last part of the URL path except the `Verb`. The syntax `Variable` + * matches part of the URL path as specified by its template. A variable + * template must not contain other variables. If a variable matches a single + * path segment, its template may be omitted, e.g. `{var}` is equivalent to + * `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If + * the `LITERAL` contains any reserved character, such characters should be + * percent-encoded before the matching. If a variable contains exactly one + * path segment, such as `"{var}"` or `"{var=*}"`, when + * such a variable is expanded into a URL path on the client side, all + * characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side + * does the reverse decoding. Such variables show up in the [Discovery + * Document](https://developers.google.com/discovery/v1/reference/apis) as + * `{var}`. If a variable contains multiple path segments, such as + * `"{var=foo/*}"` or `"{var=**}"`, when such a variable + * is expanded into a URL path on the client side, all characters except + * `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse + * decoding, except "%2F" and "%2f" are left unchanged. + * Such variables show up in the [Discovery + * Document](https://developers.google.com/discovery/v1/reference/apis) as + * `{+var}`. ## Using gRPC API Service Configuration gRPC API Service + * Configuration (service config) is a configuration language for configuring + * a gRPC service to become a user-facing product. The service config is + * simply the YAML representation of the `google.api.Service` proto message. + * As an alternative to annotating your proto file, you can configure gRPC + * transcoding in your service config YAML files. You do this by specifying a + * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same + * effect as the proto annotation. This can be particularly useful if you have + * a proto that is reused in multiple services. Note that any transcoding + * specified in the service config will override any matching transcoding + * configuration in the proto. Example: http: rules: # + * Selects a gRPC method and applies HttpRule to it. - selector: + * example.v1.Messaging.GetMessage get: + * /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC + * Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON + * conversion must follow the [proto3 + * specification](https://developers.google.com/protocol-buffers/docs/proto3#json). + * While the single segment variable follows the semantics of [RFC * 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String - * Expansion, the multi segment variable **does not** match RFC 6570 Reserved - * Expansion. The reason is that the Reserved Expansion does not expand - * special characters like `?` and `#`, which would lead to invalid URLs. - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. + * Expansion, the multi segment variable **does not** follow RFC 6570 + * Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion + * does not expand special characters like `?` and `#`, which would lead to + * invalid URLs. As the result, gRPC Transcoding uses a custom encoding for + * multi segment variables. The path variables **must not** refer to any + * repeated or mapped field, because client libraries are not capable of + * handling such variable expansion. The path variables **must not** capture + * the leading "/" character. The reason is that the most common use + * case "{var}" does not capture the leading "/" + * character. For consistency, all path variables must share the same + * behavior. Repeated message fields must not be mapped to URL query + * parameters, because no client library can support such complicated mapping. + * If an API needs to use a JSON array for request or response body, it can + * map the request or response body to a repeated field. However, some gRPC + * Transcoding implementations may not support this feature. */ export interface Schema$HttpRule { /** @@ -1180,17 +1188,11 @@ export namespace serviceusage_v1 { */ additionalBindings?: Schema$HttpRule[]; /** - * Specifies the permission(s) required for an API element for the overall - * API request to succeed. It is typically used to mark request message - * fields that contain the name of the resource and indicates the - * permissions that will be checked on that resource. - */ - authorizations?: Schema$AuthorizationRule[]; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. + * The name of the request field whose value is mapped to the HTTP request + * body, or `*` for mapping all request fields not captured by the path + * pattern to the HTTP body, or omitted for not having any HTTP request + * body. NOTE: the referred field must be present at the top-level of the + * request message type. */ body?: string; /** @@ -1201,73 +1203,36 @@ export namespace serviceusage_v1 { */ custom?: Schema$CustomHttpPattern; /** - * Used for deleting a resource. + * Maps to HTTP DELETE. Used for deleting a resource. */ delete?: string; /** - * Used for listing and getting information about resources. + * Maps to HTTP GET. Used for listing and getting information about + * resources. */ get?: string; /** - * Use this only for Scotty Requests. Do not use this for bytestream - * methods. For media support, add instead - * [][google.bytestream.RestByteStream] as an API to your configuration. - */ - mediaDownload?: Schema$MediaDownload; - /** - * Use this only for Scotty Requests. Do not use this for media support - * using Bytestream, add instead [][google.bytestream.RestByteStream] as an - * API to your configuration for Bytestream methods. - */ - mediaUpload?: Schema$MediaUpload; - /** - * Used for updating a resource. + * Maps to HTTP PATCH. Used for updating a resource. */ patch?: string; /** - * Used for creating a resource. + * Maps to HTTP POST. Used for creating a resource or performing an action. */ post?: string; /** - * Used for updating a resource. + * Maps to HTTP PUT. Used for replacing a resource. */ put?: string; /** * Optional. The name of the response field whose value is mapped to the - * HTTP body of response. Other response fields are ignored. When not set, - * the response message will be used as HTTP body of response. + * HTTP response body. When omitted, the entire response message will be + * used as the HTTP response body. NOTE: The referred field must be present + * at the top-level of the response message type. */ responseBody?: string; /** - * DO NOT USE. This is an experimental field. Optional. The REST collection - * name is by default derived from the URL pattern. If specified, this field - * overrides the default collection name. Example: rpc - * AddressesAggregatedList(AddressesAggregatedListRequest) returns - * (AddressesAggregatedListResponse) { option (google.api.http) = { - * get: "/v1/projects/{project_id}/aggregated/addresses" - * rest_collection: "projects.addresses" }; } This - * method has the automatically derived collection name - * "projects.aggregated". Because, semantically, this rpc is - * actually an operation on the "projects.addresses" collection, - * the `rest_collection` field is configured to override the derived - * collection name. - */ - restCollection?: string; - /** - * DO NOT USE. This is an experimental field. Optional. The rest method - * name is by default derived from the URL pattern. If specified, this field - * overrides the default method name. Example: rpc - * CreateResource(CreateResourceRequest) returns - * (CreateResourceResponse) { option (google.api.http) = { post: - * "/v1/resources", body: "resource", - * rest_method_name: "insert" }; } This method has the - * automatically derived rest method name "create", but for - * backwards compatibility with apiary, it is specified as insert. - */ - restMethodName?: string; - /** - * Selects methods to which this rule applies. Refer to selector for syntax - * details. + * Selects a method to which this rule applies. Refer to selector for + * syntax details. */ selector?: string; } @@ -1394,87 +1359,6 @@ export namespace serviceusage_v1 { */ monitoredResource?: string; } - /** - * Defines the Media configuration for a service in case of a download. Use - * this only for Scotty Requests. Do not use this for media support using - * Bytestream, add instead [][google.bytestream.RestByteStream] as an API to - * your configuration for Bytestream methods. - */ - export interface Schema$MediaDownload { - /** - * A boolean that determines whether a notification for the completion of a - * download should be sent to the backend. - */ - completeNotification?: boolean; - /** - * DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED. Specify - * name of the download service if one is used for download. - */ - downloadService?: string; - /** - * Name of the Scotty dropzone to use for the current API. - */ - dropzone?: string; - /** - * Whether download is enabled. - */ - enabled?: boolean; - /** - * Optional maximum acceptable size for direct download. The size is - * specified in bytes. - */ - maxDirectDownloadSize?: string; - /** - * A boolean that determines if direct download from ESF should be used for - * download of this media. - */ - useDirectDownload?: boolean; - } - /** - * Defines the Media configuration for a service in case of an upload. Use - * this only for Scotty Requests. Do not use this for media support using - * Bytestream, add instead [][google.bytestream.RestByteStream] as an API to - * your configuration for Bytestream methods. - */ - export interface Schema$MediaUpload { - /** - * A boolean that determines whether a notification for the completion of an - * upload should be sent to the backend. These notifications will not be - * seen by the client and will not consume quota. - */ - completeNotification?: boolean; - /** - * Name of the Scotty dropzone to use for the current API. - */ - dropzone?: string; - /** - * Whether upload is enabled. - */ - enabled?: boolean; - /** - * Optional maximum acceptable size for an upload. The size is specified in - * bytes. - */ - maxSize?: string; - /** - * An array of mimetype patterns. Esf will only accept uploads that match - * one of the given patterns. - */ - mimeTypes?: string[]; - /** - * Whether to receive a notification for progress changes of media upload. - */ - progressNotification?: boolean; - /** - * Whether to receive a notification on the start of media upload. - */ - startNotification?: boolean; - /** - * DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED. Specify - * name of the upload service if one is used for upload. - */ - uploadService?: string; - } /** * Method represents a method of an API interface. */ @@ -1910,14 +1794,15 @@ export namespace serviceusage_v1 { * defines a set of metrics. - For API calls, the quota.metric_rules maps * methods to metrics with corresponding costs. - The quota.limits defines * limits on the metrics, which will be used for quota checks at runtime. An - * example quota configuration in yaml format: quota: - name: - * apiWriteQpsPerProject metric: library.googleapis.com/write_calls - * unit: "1/min/{project}" # rate limit for consumer projects - * values: STANDARD: 10000 # The metric rules bind all methods - * to the read_calls metric, # except for the UpdateBook and DeleteBook - * methods. These two methods # are mapped to the write_calls metric, - * with the UpdateBook method # consuming at twice rate as the DeleteBook - * method. metric_rules: - selector: "*" metric_costs: + * example quota configuration in yaml format: quota: limits: - + * name: apiWriteQpsPerProject metric: + * library.googleapis.com/write_calls unit: "1/min/{project}" + * # rate limit for consumer projects values: STANDARD: 10000 + * # The metric rules bind all methods to the read_calls metric, # except + * for the UpdateBook and DeleteBook methods. These two methods # are + * mapped to the write_calls metric, with the UpdateBook method # + * consuming at twice rate as the DeleteBook method. metric_rules: - + * selector: "*" metric_costs: * library.googleapis.com/read_calls: 1 - selector: * google.example.library.v1.LibraryService.UpdateBook metric_costs: * library.googleapis.com/write_calls: 2 - selector: diff --git a/src/apis/serviceusage/v1beta1.ts b/src/apis/serviceusage/v1beta1.ts index 2b4a8a364bd..4f7f0b2a5b4 100644 --- a/src/apis/serviceusage/v1beta1.ts +++ b/src/apis/serviceusage/v1beta1.ts @@ -184,32 +184,6 @@ export namespace serviceusage_v1beta1 { */ provider?: string; } - /** - * Authorization rule for API services. It specifies the permission(s) - * required for an API element for the overall API request to succeed. It is - * typically used to mark request message fields that contain the name of the - * resource and indicates the permissions that will be checked on that - * resource. For example: package google.storage.v1; message - * CopyObjectRequest { string source = 1 [ - * (google.api.authz).permissions = "storage.objects.get"]; string - * destination = 2 [ (google.api.authz).permissions = - * "storage.objects.create,storage.objects.update"]; } - */ - export interface Schema$AuthorizationRule { - /** - * The required permissions. The acceptable values vary depend on the - * authorization system used. For Google APIs, it should be a - * comma-separated Google IAM permission values. When multiple permissions - * are listed, the semantics is not defined by the system. Additional - * documentation must be provided manually. - */ - permissions?: string; - /** - * Selects the API elements to which this rule applies. Refer to selector - * for syntax details. - */ - selector?: string; - } /** * Configuration for an anthentication provider, including support for [JSON * Web Token @@ -1041,123 +1015,157 @@ export namespace serviceusage_v1beta1 { rules?: Schema$HttpRule[]; } /** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP REST - * API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and HTTP - * request body. The mapping is typically specified as an `google.api.http` - * annotation on the RPC method, see "google/api/annotations.proto" - * for details. The mapping consists of a field specifying the path template - * and method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET operation on a - * resource collection of messages: service Messaging { rpc + * # gRPC Transcoding gRPC Transcoding is a feature for mapping between a + * gRPC method and one or more HTTP REST endpoints. It allows developers to + * build a single API service that supports both gRPC APIs and REST APIs. Many + * systems, including [Google APIs](https://github.com/googleapis/googleapis), + * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC + * Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and + * [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and + * use it for large scale production services. `HttpRule` defines the schema + * of the gRPC/REST mapping. The mapping specifies how different portions of + * the gRPC request message are mapped to the URL path, URL query parameters, + * and HTTP request body. It also controls how the gRPC response message is + * mapped to the HTTP response body. `HttpRule` is typically specified as an + * `google.api.http` annotation on the gRPC method. Each mapping specifies a + * URL path template and an HTTP method. The path template may refer to one or + * more fields in the gRPC request message, as long as each field is a + * non-repeated field with a primitive (non-message) type. The path template + * controls how fields of the request message are mapped to the URL path. + * Example: service Messaging { rpc GetMessage(GetMessageRequest) + * returns (Message) { option (google.api.http) = { get: + * "/v1/{name=messages/*"}" }; } } message + * GetMessageRequest { string name = 1; // Mapped to URL path. } + * message Message { string text = 1; // The resource content. } + * This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC + * -----|----- `GET /v1/messages/123456` | `GetMessage(name: + * "messages/123456")` Any fields in the request message which are + * not bound by the path template automatically become HTTP query parameters + * if there is no HTTP request body. For example: service Messaging { rpc * GetMessage(GetMessageRequest) returns (Message) { option - * (google.api.http).get = - * "/v1/messages/{message_id}/{sub.subfield}"; } } message - * GetMessageRequest { message SubMessage { string subfield = 1; - * } string message_id = 1; // mapped to the URL SubMessage sub = - * 2; // `sub.subfield` is url-mapped } message Message { string - * text = 1; // content of the resource } The same http annotation can - * alternatively be expressed inside the `GRPC API Configuration` YAML file. - * http: rules: - selector: - * <proto_package_name>.Messaging.GetMessage get: - * /v1/messages/{message_id}/{sub.subfield} This definition enables an - * automatic, bidrectional mapping of HTTP JSON to RPC. Example: HTTP | RPC - * -----|----- `GET /v1/messages/123456/foo` | `GetMessage(message_id: - * "123456" sub: SubMessage(subfield: "foo"))` In - * general, not only fields but also field paths can be referenced from a path - * pattern. Fields mapped to the path pattern cannot be repeated and must have - * a primitive (non-message) type. Any fields in the request message which - * are not bound by the path pattern automatically become (optional) HTTP - * query parameters. Assume the following definition of the request message: - * service Messaging { rpc GetMessage(GetMessageRequest) returns - * (Message) { option (google.api.http).get = - * "/v1/messages/{message_id}"; } } message - * GetMessageRequest { message SubMessage { string subfield = 1; - * } string message_id = 1; // mapped to the URL int64 revision = - * 2; // becomes a parameter SubMessage sub = 3; // `sub.subfield` - * becomes a parameter } This enables a HTTP JSON to RPC mapping as - * below: HTTP | RPC -----|----- `GET + * (google.api.http) = { get:"/v1/messages/{message_id}" + * }; } } message GetMessageRequest { message SubMessage { + * string subfield = 1; } string message_id = 1; // Mapped to URL + * path. int64 revision = 2; // Mapped to URL query parameter + * `revision`. SubMessage sub = 3; // Mapped to URL query parameter + * `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: + * HTTP | gRPC -----|----- `GET * /v1/messages/123456?revision=2&sub.subfield=foo` | * `GetMessage(message_id: "123456" revision: 2 sub: * SubMessage(subfield: "foo"))` Note that fields which are mapped - * to HTTP parameters must have a primitive type or a repeated primitive type. - * Message types are not allowed. In the case of a repeated type, the - * parameter can be repeated in the URL, as in `...?param=A&param=B`. For - * HTTP method kinds which allow a request body, the `body` field specifies - * the mapping. Consider a REST update method on the message resource - * collection: service Messaging { rpc - * UpdateMessage(UpdateMessageRequest) returns (Message) { option - * (google.api.http) = { put: "/v1/messages/{message_id}" - * body: "message" }; } } message - * UpdateMessageRequest { string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body } The following HTTP - * JSON to RPC mapping is enabled, where the representation of the JSON in the - * request body is determined by protos JSON encoding: HTTP | RPC -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | - * `UpdateMessage(message_id: "123456" message { text: - * "Hi!" })` The special name `*` can be used in the body mapping - * to define that every field not bound by the path template should be mapped - * to the request body. This enables the following alternative definition of - * the update method: service Messaging { rpc - * UpdateMessage(Message) returns (Message) { option (google.api.http) - * = { put: "/v1/messages/{message_id}" body: - * "*" }; } } message Message { string - * message_id = 1; string text = 2; } The following HTTP JSON to - * RPC mapping is enabled: HTTP | RPC -----|----- `PUT /v1/messages/123456 { + * to URL query parameters must have a primitive type or a repeated primitive + * type or a non-repeated message type. In the case of a repeated type, the + * parameter can be repeated in the URL as `...?param=A&param=B`. In the + * case of a message type, each field of the message is mapped to a separate + * parameter, such as `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods + * that allow a request body, the `body` field specifies the mapping. Consider + * a REST update method on the message resource collection: service + * Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) + * { option (google.api.http) = { patch: + * "/v1/messages/{message_id}" body: "message" + * }; } } message UpdateMessageRequest { string message_id + * = 1; // mapped to the URL Message message = 2; // mapped to the + * body } The following HTTP JSON to RPC mapping is enabled, where the + * representation of the JSON in the request body is determined by protos JSON + * encoding: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { * "text": "Hi!" }` | `UpdateMessage(message_id: - * "123456" text: "Hi!")` Note that when using `*` in the - * body mapping, it is not possible to have HTTP parameters, as all fields not - * bound by the path end in the body. This makes this option more rarely used - * in practice of defining REST APIs. The common usage of `*` is in custom - * methods which don't use the URL at all for transferring data. It is - * possible to define multiple HTTP methods for one RPC by using the - * `additional_bindings` option. Example: service Messaging { rpc - * GetMessage(GetMessageRequest) returns (Message) { option - * (google.api.http) = { get: "/v1/messages/{message_id}" - * additional_bindings { get: + * "123456" message { text: "Hi!" })` The special name + * `*` can be used in the body mapping to define that every field not bound by + * the path template should be mapped to the request body. This enables the + * following alternative definition of the update method: service + * Messaging { rpc UpdateMessage(Message) returns (Message) { option + * (google.api.http) = { patch: + * "/v1/messages/{message_id}" body: "*" }; } } + * message Message { string message_id = 1; string text = 2; } + * The following HTTP JSON to RPC mapping is enabled: HTTP | gRPC -----|----- + * `PATCH /v1/messages/123456 { "text": "Hi!" }` | + * `UpdateMessage(message_id: "123456" text: "Hi!")` Note + * that when using `*` in the body mapping, it is not possible to have HTTP + * parameters, as all fields not bound by the path end in the body. This makes + * this option more rarely used in practice when defining REST APIs. The + * common usage of `*` is in custom methods which don't use the URL at all + * for transferring data. It is possible to define multiple HTTP methods for + * one RPC by using the `additional_bindings` option. Example: service + * Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http) = { get: + * "/v1/messages/{message_id}" additional_bindings { get: * "/v1/users/{user_id}/messages/{message_id}" } }; } } * message GetMessageRequest { string message_id = 1; string - * user_id = 2; } This enables the following two alternative HTTP JSON - * to RPC mappings: HTTP | RPC -----|----- `GET /v1/messages/123456` | + * user_id = 2; } This enables the following two alternative HTTP JSON to + * RPC mappings: HTTP | gRPC -----|----- `GET /v1/messages/123456` | * `GetMessage(message_id: "123456")` `GET * /v1/users/me/messages/123456` | `GetMessage(user_id: "me" - * message_id: "123456")` # Rules for HTTP mapping The rules for - * mapping HTTP path, query parameters, and body fields to the request message - * are as follows: 1. The `body` field specifies either `*` or a field path, - * or is omitted. If omitted, it indicates there is no HTTP request - * body. 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: (a) Matched in the URL - * template. (b) Covered by body (if body is `*`, everything except (a) - * fields; else everything under the body field) (c) All other - * fields. 3. URL query parameters found in the HTTP request are mapped to (c) - * fields. 4. Any body sent with an HTTP request can contain only (b) fields. - * The syntax of the path template is as follows: Template = + * message_id: "123456")` ## Rules for HTTP mapping 1. Leaf + * request fields (recursive expansion nested messages in the request message) + * are classified into three categories: - Fields referred by the path + * template. They are passed via the URL path. - Fields referred by the + * HttpRule.body. They are passed via the HTTP request body. - All + * other fields are passed via the URL query parameters, and the parameter + * name is the field path in the request message. A repeated field can be + * represented as multiple query parameters under the same name. 2. If + * HttpRule.body is "*", there is no URL query parameter, all fields + * are passed via URL path and HTTP request body. 3. If HttpRule.body is + * omitted, there is no HTTP request body, all fields are passed via URL + * path and URL query parameters. ### Path template syntax Template = * "/" Segments [ Verb ] ; Segments = Segment { "/" * Segment } ; Segment = "*" | "**" | LITERAL | * Variable ; Variable = "{" FieldPath [ "=" Segments * ] "}" ; FieldPath = IDENT { "." IDENT } ; Verb - * = ":" LITERAL ; The syntax `*` matches a single path segment. - * The syntax `**` matches zero or more path segments, which must be the last - * part of the path except the `Verb`. The syntax `LITERAL` matches literal - * text in the path. The syntax `Variable` matches part of the URL path as - * specified by its template. A variable template must not contain other - * variables. If a variable matches a single path segment, its template may be - * omitted, e.g. `{var}` is equivalent to `{var=*}`. If a variable contains - * exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, - * all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{var}`. If a variable contains one - * or more path segments, such as `"{var=foo/*}"` or - * `"{var=**}"`, when such a variable is expanded into a URL path, - * all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such - * variables show up in the Discovery Document as `{+var}`. NOTE: While the - * single segment variable matches the semantics of [RFC + * = ":" LITERAL ; The syntax `*` matches a single URL path + * segment. The syntax `**` matches zero or more URL path segments, which must + * be the last part of the URL path except the `Verb`. The syntax `Variable` + * matches part of the URL path as specified by its template. A variable + * template must not contain other variables. If a variable matches a single + * path segment, its template may be omitted, e.g. `{var}` is equivalent to + * `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If + * the `LITERAL` contains any reserved character, such characters should be + * percent-encoded before the matching. If a variable contains exactly one + * path segment, such as `"{var}"` or `"{var=*}"`, when + * such a variable is expanded into a URL path on the client side, all + * characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side + * does the reverse decoding. Such variables show up in the [Discovery + * Document](https://developers.google.com/discovery/v1/reference/apis) as + * `{var}`. If a variable contains multiple path segments, such as + * `"{var=foo/*}"` or `"{var=**}"`, when such a variable + * is expanded into a URL path on the client side, all characters except + * `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse + * decoding, except "%2F" and "%2f" are left unchanged. + * Such variables show up in the [Discovery + * Document](https://developers.google.com/discovery/v1/reference/apis) as + * `{+var}`. ## Using gRPC API Service Configuration gRPC API Service + * Configuration (service config) is a configuration language for configuring + * a gRPC service to become a user-facing product. The service config is + * simply the YAML representation of the `google.api.Service` proto message. + * As an alternative to annotating your proto file, you can configure gRPC + * transcoding in your service config YAML files. You do this by specifying a + * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same + * effect as the proto annotation. This can be particularly useful if you have + * a proto that is reused in multiple services. Note that any transcoding + * specified in the service config will override any matching transcoding + * configuration in the proto. Example: http: rules: # + * Selects a gRPC method and applies HttpRule to it. - selector: + * example.v1.Messaging.GetMessage get: + * /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC + * Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON + * conversion must follow the [proto3 + * specification](https://developers.google.com/protocol-buffers/docs/proto3#json). + * While the single segment variable follows the semantics of [RFC * 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String - * Expansion, the multi segment variable **does not** match RFC 6570 Reserved - * Expansion. The reason is that the Reserved Expansion does not expand - * special characters like `?` and `#`, which would lead to invalid URLs. - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. + * Expansion, the multi segment variable **does not** follow RFC 6570 + * Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion + * does not expand special characters like `?` and `#`, which would lead to + * invalid URLs. As the result, gRPC Transcoding uses a custom encoding for + * multi segment variables. The path variables **must not** refer to any + * repeated or mapped field, because client libraries are not capable of + * handling such variable expansion. The path variables **must not** capture + * the leading "/" character. The reason is that the most common use + * case "{var}" does not capture the leading "/" + * character. For consistency, all path variables must share the same + * behavior. Repeated message fields must not be mapped to URL query + * parameters, because no client library can support such complicated mapping. + * If an API needs to use a JSON array for request or response body, it can + * map the request or response body to a repeated field. However, some gRPC + * Transcoding implementations may not support this feature. */ export interface Schema$HttpRule { /** @@ -1167,17 +1175,11 @@ export namespace serviceusage_v1beta1 { */ additionalBindings?: Schema$HttpRule[]; /** - * Specifies the permission(s) required for an API element for the overall - * API request to succeed. It is typically used to mark request message - * fields that contain the name of the resource and indicates the - * permissions that will be checked on that resource. - */ - authorizations?: Schema$AuthorizationRule[]; - /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. + * The name of the request field whose value is mapped to the HTTP request + * body, or `*` for mapping all request fields not captured by the path + * pattern to the HTTP body, or omitted for not having any HTTP request + * body. NOTE: the referred field must be present at the top-level of the + * request message type. */ body?: string; /** @@ -1188,73 +1190,36 @@ export namespace serviceusage_v1beta1 { */ custom?: Schema$CustomHttpPattern; /** - * Used for deleting a resource. + * Maps to HTTP DELETE. Used for deleting a resource. */ delete?: string; /** - * Used for listing and getting information about resources. + * Maps to HTTP GET. Used for listing and getting information about + * resources. */ get?: string; /** - * Use this only for Scotty Requests. Do not use this for bytestream - * methods. For media support, add instead - * [][google.bytestream.RestByteStream] as an API to your configuration. - */ - mediaDownload?: Schema$MediaDownload; - /** - * Use this only for Scotty Requests. Do not use this for media support - * using Bytestream, add instead [][google.bytestream.RestByteStream] as an - * API to your configuration for Bytestream methods. - */ - mediaUpload?: Schema$MediaUpload; - /** - * Used for updating a resource. + * Maps to HTTP PATCH. Used for updating a resource. */ patch?: string; /** - * Used for creating a resource. + * Maps to HTTP POST. Used for creating a resource or performing an action. */ post?: string; /** - * Used for updating a resource. + * Maps to HTTP PUT. Used for replacing a resource. */ put?: string; /** * Optional. The name of the response field whose value is mapped to the - * HTTP body of response. Other response fields are ignored. When not set, - * the response message will be used as HTTP body of response. + * HTTP response body. When omitted, the entire response message will be + * used as the HTTP response body. NOTE: The referred field must be present + * at the top-level of the response message type. */ responseBody?: string; /** - * DO NOT USE. This is an experimental field. Optional. The REST collection - * name is by default derived from the URL pattern. If specified, this field - * overrides the default collection name. Example: rpc - * AddressesAggregatedList(AddressesAggregatedListRequest) returns - * (AddressesAggregatedListResponse) { option (google.api.http) = { - * get: "/v1/projects/{project_id}/aggregated/addresses" - * rest_collection: "projects.addresses" }; } This - * method has the automatically derived collection name - * "projects.aggregated". Because, semantically, this rpc is - * actually an operation on the "projects.addresses" collection, - * the `rest_collection` field is configured to override the derived - * collection name. - */ - restCollection?: string; - /** - * DO NOT USE. This is an experimental field. Optional. The rest method - * name is by default derived from the URL pattern. If specified, this field - * overrides the default method name. Example: rpc - * CreateResource(CreateResourceRequest) returns - * (CreateResourceResponse) { option (google.api.http) = { post: - * "/v1/resources", body: "resource", - * rest_method_name: "insert" }; } This method has the - * automatically derived rest method name "create", but for - * backwards compatibility with apiary, it is specified as insert. - */ - restMethodName?: string; - /** - * Selects methods to which this rule applies. Refer to selector for syntax - * details. + * Selects a method to which this rule applies. Refer to selector for + * syntax details. */ selector?: string; } @@ -1381,87 +1346,6 @@ export namespace serviceusage_v1beta1 { */ monitoredResource?: string; } - /** - * Defines the Media configuration for a service in case of a download. Use - * this only for Scotty Requests. Do not use this for media support using - * Bytestream, add instead [][google.bytestream.RestByteStream] as an API to - * your configuration for Bytestream methods. - */ - export interface Schema$MediaDownload { - /** - * A boolean that determines whether a notification for the completion of a - * download should be sent to the backend. - */ - completeNotification?: boolean; - /** - * DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED. Specify - * name of the download service if one is used for download. - */ - downloadService?: string; - /** - * Name of the Scotty dropzone to use for the current API. - */ - dropzone?: string; - /** - * Whether download is enabled. - */ - enabled?: boolean; - /** - * Optional maximum acceptable size for direct download. The size is - * specified in bytes. - */ - maxDirectDownloadSize?: string; - /** - * A boolean that determines if direct download from ESF should be used for - * download of this media. - */ - useDirectDownload?: boolean; - } - /** - * Defines the Media configuration for a service in case of an upload. Use - * this only for Scotty Requests. Do not use this for media support using - * Bytestream, add instead [][google.bytestream.RestByteStream] as an API to - * your configuration for Bytestream methods. - */ - export interface Schema$MediaUpload { - /** - * A boolean that determines whether a notification for the completion of an - * upload should be sent to the backend. These notifications will not be - * seen by the client and will not consume quota. - */ - completeNotification?: boolean; - /** - * Name of the Scotty dropzone to use for the current API. - */ - dropzone?: string; - /** - * Whether upload is enabled. - */ - enabled?: boolean; - /** - * Optional maximum acceptable size for an upload. The size is specified in - * bytes. - */ - maxSize?: string; - /** - * An array of mimetype patterns. Esf will only accept uploads that match - * one of the given patterns. - */ - mimeTypes?: string[]; - /** - * Whether to receive a notification for progress changes of media upload. - */ - progressNotification?: boolean; - /** - * Whether to receive a notification on the start of media upload. - */ - startNotification?: boolean; - /** - * DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED. Specify - * name of the upload service if one is used for upload. - */ - uploadService?: string; - } /** * Method represents a method of an API interface. */ @@ -1897,14 +1781,15 @@ export namespace serviceusage_v1beta1 { * defines a set of metrics. - For API calls, the quota.metric_rules maps * methods to metrics with corresponding costs. - The quota.limits defines * limits on the metrics, which will be used for quota checks at runtime. An - * example quota configuration in yaml format: quota: - name: - * apiWriteQpsPerProject metric: library.googleapis.com/write_calls - * unit: "1/min/{project}" # rate limit for consumer projects - * values: STANDARD: 10000 # The metric rules bind all methods - * to the read_calls metric, # except for the UpdateBook and DeleteBook - * methods. These two methods # are mapped to the write_calls metric, - * with the UpdateBook method # consuming at twice rate as the DeleteBook - * method. metric_rules: - selector: "*" metric_costs: + * example quota configuration in yaml format: quota: limits: - + * name: apiWriteQpsPerProject metric: + * library.googleapis.com/write_calls unit: "1/min/{project}" + * # rate limit for consumer projects values: STANDARD: 10000 + * # The metric rules bind all methods to the read_calls metric, # except + * for the UpdateBook and DeleteBook methods. These two methods # are + * mapped to the write_calls metric, with the UpdateBook method # + * consuming at twice rate as the DeleteBook method. metric_rules: - + * selector: "*" metric_costs: * library.googleapis.com/read_calls: 1 - selector: * google.example.library.v1.LibraryService.UpdateBook metric_costs: * library.googleapis.com/write_calls: 2 - selector: diff --git a/src/apis/serviceuser/v1.ts b/src/apis/serviceuser/v1.ts index c14de69ff32..438083d9383 100644 --- a/src/apis/serviceuser/v1.ts +++ b/src/apis/serviceuser/v1.ts @@ -713,123 +713,157 @@ export namespace serviceuser_v1 { rules?: Schema$HttpRule[]; } /** - * `HttpRule` defines the mapping of an RPC method to one or more HTTP REST - * API methods. The mapping specifies how different portions of the RPC - * request message are mapped to URL path, URL query parameters, and HTTP - * request body. The mapping is typically specified as an `google.api.http` - * annotation on the RPC method, see "google/api/annotations.proto" - * for details. The mapping consists of a field specifying the path template - * and method kind. The path template can refer to fields in the request - * message, as in the example below which describes a REST GET operation on a - * resource collection of messages: service Messaging { rpc + * # gRPC Transcoding gRPC Transcoding is a feature for mapping between a + * gRPC method and one or more HTTP REST endpoints. It allows developers to + * build a single API service that supports both gRPC APIs and REST APIs. Many + * systems, including [Google APIs](https://github.com/googleapis/googleapis), + * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC + * Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and + * [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and + * use it for large scale production services. `HttpRule` defines the schema + * of the gRPC/REST mapping. The mapping specifies how different portions of + * the gRPC request message are mapped to the URL path, URL query parameters, + * and HTTP request body. It also controls how the gRPC response message is + * mapped to the HTTP response body. `HttpRule` is typically specified as an + * `google.api.http` annotation on the gRPC method. Each mapping specifies a + * URL path template and an HTTP method. The path template may refer to one or + * more fields in the gRPC request message, as long as each field is a + * non-repeated field with a primitive (non-message) type. The path template + * controls how fields of the request message are mapped to the URL path. + * Example: service Messaging { rpc GetMessage(GetMessageRequest) + * returns (Message) { option (google.api.http) = { get: + * "/v1/{name=messages/*"}" }; } } message + * GetMessageRequest { string name = 1; // Mapped to URL path. } + * message Message { string text = 1; // The resource content. } + * This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC + * -----|----- `GET /v1/messages/123456` | `GetMessage(name: + * "messages/123456")` Any fields in the request message which are + * not bound by the path template automatically become HTTP query parameters + * if there is no HTTP request body. For example: service Messaging { rpc * GetMessage(GetMessageRequest) returns (Message) { option - * (google.api.http).get = - * "/v1/messages/{message_id}/{sub.subfield}"; } } message - * GetMessageRequest { message SubMessage { string subfield = 1; - * } string message_id = 1; // mapped to the URL SubMessage sub = - * 2; // `sub.subfield` is url-mapped } message Message { string - * text = 1; // content of the resource } The same http annotation can - * alternatively be expressed inside the `GRPC API Configuration` YAML file. - * http: rules: - selector: - * <proto_package_name>.Messaging.GetMessage get: - * /v1/messages/{message_id}/{sub.subfield} This definition enables an - * automatic, bidrectional mapping of HTTP JSON to RPC. Example: HTTP | RPC - * -----|----- `GET /v1/messages/123456/foo` | `GetMessage(message_id: - * "123456" sub: SubMessage(subfield: "foo"))` In - * general, not only fields but also field paths can be referenced from a path - * pattern. Fields mapped to the path pattern cannot be repeated and must have - * a primitive (non-message) type. Any fields in the request message which - * are not bound by the path pattern automatically become (optional) HTTP - * query parameters. Assume the following definition of the request message: - * service Messaging { rpc GetMessage(GetMessageRequest) returns - * (Message) { option (google.api.http).get = - * "/v1/messages/{message_id}"; } } message - * GetMessageRequest { message SubMessage { string subfield = 1; - * } string message_id = 1; // mapped to the URL int64 revision = - * 2; // becomes a parameter SubMessage sub = 3; // `sub.subfield` - * becomes a parameter } This enables a HTTP JSON to RPC mapping as - * below: HTTP | RPC -----|----- `GET + * (google.api.http) = { get:"/v1/messages/{message_id}" + * }; } } message GetMessageRequest { message SubMessage { + * string subfield = 1; } string message_id = 1; // Mapped to URL + * path. int64 revision = 2; // Mapped to URL query parameter + * `revision`. SubMessage sub = 3; // Mapped to URL query parameter + * `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: + * HTTP | gRPC -----|----- `GET * /v1/messages/123456?revision=2&sub.subfield=foo` | * `GetMessage(message_id: "123456" revision: 2 sub: * SubMessage(subfield: "foo"))` Note that fields which are mapped - * to HTTP parameters must have a primitive type or a repeated primitive type. - * Message types are not allowed. In the case of a repeated type, the - * parameter can be repeated in the URL, as in `...?param=A&param=B`. For - * HTTP method kinds which allow a request body, the `body` field specifies - * the mapping. Consider a REST update method on the message resource - * collection: service Messaging { rpc - * UpdateMessage(UpdateMessageRequest) returns (Message) { option - * (google.api.http) = { put: "/v1/messages/{message_id}" - * body: "message" }; } } message - * UpdateMessageRequest { string message_id = 1; // mapped to the URL - * Message message = 2; // mapped to the body } The following HTTP - * JSON to RPC mapping is enabled, where the representation of the JSON in the - * request body is determined by protos JSON encoding: HTTP | RPC -----|----- - * `PUT /v1/messages/123456 { "text": "Hi!" }` | - * `UpdateMessage(message_id: "123456" message { text: - * "Hi!" })` The special name `*` can be used in the body mapping - * to define that every field not bound by the path template should be mapped - * to the request body. This enables the following alternative definition of - * the update method: service Messaging { rpc - * UpdateMessage(Message) returns (Message) { option (google.api.http) - * = { put: "/v1/messages/{message_id}" body: - * "*" }; } } message Message { string - * message_id = 1; string text = 2; } The following HTTP JSON to - * RPC mapping is enabled: HTTP | RPC -----|----- `PUT /v1/messages/123456 { + * to URL query parameters must have a primitive type or a repeated primitive + * type or a non-repeated message type. In the case of a repeated type, the + * parameter can be repeated in the URL as `...?param=A&param=B`. In the + * case of a message type, each field of the message is mapped to a separate + * parameter, such as `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods + * that allow a request body, the `body` field specifies the mapping. Consider + * a REST update method on the message resource collection: service + * Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) + * { option (google.api.http) = { patch: + * "/v1/messages/{message_id}" body: "message" + * }; } } message UpdateMessageRequest { string message_id + * = 1; // mapped to the URL Message message = 2; // mapped to the + * body } The following HTTP JSON to RPC mapping is enabled, where the + * representation of the JSON in the request body is determined by protos JSON + * encoding: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { * "text": "Hi!" }` | `UpdateMessage(message_id: - * "123456" text: "Hi!")` Note that when using `*` in the - * body mapping, it is not possible to have HTTP parameters, as all fields not - * bound by the path end in the body. This makes this option more rarely used - * in practice of defining REST APIs. The common usage of `*` is in custom - * methods which don't use the URL at all for transferring data. It is - * possible to define multiple HTTP methods for one RPC by using the - * `additional_bindings` option. Example: service Messaging { rpc - * GetMessage(GetMessageRequest) returns (Message) { option - * (google.api.http) = { get: "/v1/messages/{message_id}" - * additional_bindings { get: + * "123456" message { text: "Hi!" })` The special name + * `*` can be used in the body mapping to define that every field not bound by + * the path template should be mapped to the request body. This enables the + * following alternative definition of the update method: service + * Messaging { rpc UpdateMessage(Message) returns (Message) { option + * (google.api.http) = { patch: + * "/v1/messages/{message_id}" body: "*" }; } } + * message Message { string message_id = 1; string text = 2; } + * The following HTTP JSON to RPC mapping is enabled: HTTP | gRPC -----|----- + * `PATCH /v1/messages/123456 { "text": "Hi!" }` | + * `UpdateMessage(message_id: "123456" text: "Hi!")` Note + * that when using `*` in the body mapping, it is not possible to have HTTP + * parameters, as all fields not bound by the path end in the body. This makes + * this option more rarely used in practice when defining REST APIs. The + * common usage of `*` is in custom methods which don't use the URL at all + * for transferring data. It is possible to define multiple HTTP methods for + * one RPC by using the `additional_bindings` option. Example: service + * Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http) = { get: + * "/v1/messages/{message_id}" additional_bindings { get: * "/v1/users/{user_id}/messages/{message_id}" } }; } } * message GetMessageRequest { string message_id = 1; string - * user_id = 2; } This enables the following two alternative HTTP JSON - * to RPC mappings: HTTP | RPC -----|----- `GET /v1/messages/123456` | + * user_id = 2; } This enables the following two alternative HTTP JSON to + * RPC mappings: HTTP | gRPC -----|----- `GET /v1/messages/123456` | * `GetMessage(message_id: "123456")` `GET * /v1/users/me/messages/123456` | `GetMessage(user_id: "me" - * message_id: "123456")` # Rules for HTTP mapping The rules for - * mapping HTTP path, query parameters, and body fields to the request message - * are as follows: 1. The `body` field specifies either `*` or a field path, - * or is omitted. If omitted, it indicates there is no HTTP request - * body. 2. Leaf fields (recursive expansion of nested messages in the - * request) can be classified into three types: (a) Matched in the URL - * template. (b) Covered by body (if body is `*`, everything except (a) - * fields; else everything under the body field) (c) All other - * fields. 3. URL query parameters found in the HTTP request are mapped to (c) - * fields. 4. Any body sent with an HTTP request can contain only (b) fields. - * The syntax of the path template is as follows: Template = + * message_id: "123456")` ## Rules for HTTP mapping 1. Leaf + * request fields (recursive expansion nested messages in the request message) + * are classified into three categories: - Fields referred by the path + * template. They are passed via the URL path. - Fields referred by the + * HttpRule.body. They are passed via the HTTP request body. - All + * other fields are passed via the URL query parameters, and the parameter + * name is the field path in the request message. A repeated field can be + * represented as multiple query parameters under the same name. 2. If + * HttpRule.body is "*", there is no URL query parameter, all fields + * are passed via URL path and HTTP request body. 3. If HttpRule.body is + * omitted, there is no HTTP request body, all fields are passed via URL + * path and URL query parameters. ### Path template syntax Template = * "/" Segments [ Verb ] ; Segments = Segment { "/" * Segment } ; Segment = "*" | "**" | LITERAL | * Variable ; Variable = "{" FieldPath [ "=" Segments * ] "}" ; FieldPath = IDENT { "." IDENT } ; Verb - * = ":" LITERAL ; The syntax `*` matches a single path segment. - * The syntax `**` matches zero or more path segments, which must be the last - * part of the path except the `Verb`. The syntax `LITERAL` matches literal - * text in the path. The syntax `Variable` matches part of the URL path as - * specified by its template. A variable template must not contain other - * variables. If a variable matches a single path segment, its template may be - * omitted, e.g. `{var}` is equivalent to `{var=*}`. If a variable contains - * exactly one path segment, such as `"{var}"` or - * `"{var=*}"`, when such a variable is expanded into a URL path, - * all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables - * show up in the Discovery Document as `{var}`. If a variable contains one - * or more path segments, such as `"{var=foo/*}"` or - * `"{var=**}"`, when such a variable is expanded into a URL path, - * all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such - * variables show up in the Discovery Document as `{+var}`. NOTE: While the - * single segment variable matches the semantics of [RFC + * = ":" LITERAL ; The syntax `*` matches a single URL path + * segment. The syntax `**` matches zero or more URL path segments, which must + * be the last part of the URL path except the `Verb`. The syntax `Variable` + * matches part of the URL path as specified by its template. A variable + * template must not contain other variables. If a variable matches a single + * path segment, its template may be omitted, e.g. `{var}` is equivalent to + * `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If + * the `LITERAL` contains any reserved character, such characters should be + * percent-encoded before the matching. If a variable contains exactly one + * path segment, such as `"{var}"` or `"{var=*}"`, when + * such a variable is expanded into a URL path on the client side, all + * characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side + * does the reverse decoding. Such variables show up in the [Discovery + * Document](https://developers.google.com/discovery/v1/reference/apis) as + * `{var}`. If a variable contains multiple path segments, such as + * `"{var=foo/*}"` or `"{var=**}"`, when such a variable + * is expanded into a URL path on the client side, all characters except + * `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse + * decoding, except "%2F" and "%2f" are left unchanged. + * Such variables show up in the [Discovery + * Document](https://developers.google.com/discovery/v1/reference/apis) as + * `{+var}`. ## Using gRPC API Service Configuration gRPC API Service + * Configuration (service config) is a configuration language for configuring + * a gRPC service to become a user-facing product. The service config is + * simply the YAML representation of the `google.api.Service` proto message. + * As an alternative to annotating your proto file, you can configure gRPC + * transcoding in your service config YAML files. You do this by specifying a + * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same + * effect as the proto annotation. This can be particularly useful if you have + * a proto that is reused in multiple services. Note that any transcoding + * specified in the service config will override any matching transcoding + * configuration in the proto. Example: http: rules: # + * Selects a gRPC method and applies HttpRule to it. - selector: + * example.v1.Messaging.GetMessage get: + * /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC + * Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON + * conversion must follow the [proto3 + * specification](https://developers.google.com/protocol-buffers/docs/proto3#json). + * While the single segment variable follows the semantics of [RFC * 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String - * Expansion, the multi segment variable **does not** match RFC 6570 Reserved - * Expansion. The reason is that the Reserved Expansion does not expand - * special characters like `?` and `#`, which would lead to invalid URLs. - * NOTE: the field paths in variables and in the `body` must not refer to - * repeated fields or map fields. + * Expansion, the multi segment variable **does not** follow RFC 6570 + * Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion + * does not expand special characters like `?` and `#`, which would lead to + * invalid URLs. As the result, gRPC Transcoding uses a custom encoding for + * multi segment variables. The path variables **must not** refer to any + * repeated or mapped field, because client libraries are not capable of + * handling such variable expansion. The path variables **must not** capture + * the leading "/" character. The reason is that the most common use + * case "{var}" does not capture the leading "/" + * character. For consistency, all path variables must share the same + * behavior. Repeated message fields must not be mapped to URL query + * parameters, because no client library can support such complicated mapping. + * If an API needs to use a JSON array for request or response body, it can + * map the request or response body to a repeated field. However, some gRPC + * Transcoding implementations may not support this feature. */ export interface Schema$HttpRule { /** @@ -839,10 +873,11 @@ export namespace serviceuser_v1 { */ additionalBindings?: Schema$HttpRule[]; /** - * The name of the request field whose value is mapped to the HTTP body, or - * `*` for mapping all fields not captured by the path pattern to the HTTP - * body. NOTE: the referred field must not be a repeated field and must be - * present at the top-level of request message type. + * The name of the request field whose value is mapped to the HTTP request + * body, or `*` for mapping all request fields not captured by the path + * pattern to the HTTP body, or omitted for not having any HTTP request + * body. NOTE: the referred field must be present at the top-level of the + * request message type. */ body?: string; /** @@ -853,46 +888,36 @@ export namespace serviceuser_v1 { */ custom?: Schema$CustomHttpPattern; /** - * Used for deleting a resource. + * Maps to HTTP DELETE. Used for deleting a resource. */ delete?: string; /** - * Used for listing and getting information about resources. + * Maps to HTTP GET. Used for listing and getting information about + * resources. */ get?: string; /** - * Use this only for Scotty Requests. Do not use this for bytestream - * methods. For media support, add instead - * [][google.bytestream.RestByteStream] as an API to your configuration. - */ - mediaDownload?: Schema$MediaDownload; - /** - * Use this only for Scotty Requests. Do not use this for media support - * using Bytestream, add instead [][google.bytestream.RestByteStream] as an - * API to your configuration for Bytestream methods. - */ - mediaUpload?: Schema$MediaUpload; - /** - * Used for updating a resource. + * Maps to HTTP PATCH. Used for updating a resource. */ patch?: string; /** - * Used for creating a resource. + * Maps to HTTP POST. Used for creating a resource or performing an action. */ post?: string; /** - * Used for updating a resource. + * Maps to HTTP PUT. Used for replacing a resource. */ put?: string; /** * Optional. The name of the response field whose value is mapped to the - * HTTP body of response. Other response fields are ignored. When not set, - * the response message will be used as HTTP body of response. + * HTTP response body. When omitted, the entire response message will be + * used as the HTTP response body. NOTE: The referred field must be present + * at the top-level of the response message type. */ responseBody?: string; /** - * Selects methods to which this rule applies. Refer to selector for syntax - * details. + * Selects a method to which this rule applies. Refer to selector for + * syntax details. */ selector?: string; } @@ -1007,87 +1032,6 @@ export namespace serviceuser_v1 { */ monitoredResource?: string; } - /** - * Defines the Media configuration for a service in case of a download. Use - * this only for Scotty Requests. Do not use this for media support using - * Bytestream, add instead [][google.bytestream.RestByteStream] as an API to - * your configuration for Bytestream methods. - */ - export interface Schema$MediaDownload { - /** - * A boolean that determines whether a notification for the completion of a - * download should be sent to the backend. - */ - completeNotification?: boolean; - /** - * DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED. Specify - * name of the download service if one is used for download. - */ - downloadService?: string; - /** - * Name of the Scotty dropzone to use for the current API. - */ - dropzone?: string; - /** - * Whether download is enabled. - */ - enabled?: boolean; - /** - * Optional maximum acceptable size for direct download. The size is - * specified in bytes. - */ - maxDirectDownloadSize?: string; - /** - * A boolean that determines if direct download from ESF should be used for - * download of this media. - */ - useDirectDownload?: boolean; - } - /** - * Defines the Media configuration for a service in case of an upload. Use - * this only for Scotty Requests. Do not use this for media support using - * Bytestream, add instead [][google.bytestream.RestByteStream] as an API to - * your configuration for Bytestream methods. - */ - export interface Schema$MediaUpload { - /** - * A boolean that determines whether a notification for the completion of an - * upload should be sent to the backend. These notifications will not be - * seen by the client and will not consume quota. - */ - completeNotification?: boolean; - /** - * Name of the Scotty dropzone to use for the current API. - */ - dropzone?: string; - /** - * Whether upload is enabled. - */ - enabled?: boolean; - /** - * Optional maximum acceptable size for an upload. The size is specified in - * bytes. - */ - maxSize?: string; - /** - * An array of mimetype patterns. Esf will only accept uploads that match - * one of the given patterns. - */ - mimeTypes?: string[]; - /** - * Whether to receive a notification for progress changes of media upload. - */ - progressNotification?: boolean; - /** - * Whether to receive a notification on the start of media upload. - */ - startNotification?: boolean; - /** - * DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED. Specify - * name of the upload service if one is used for upload. - */ - uploadService?: string; - } /** * Method represents a method of an API interface. */ @@ -1550,14 +1494,15 @@ export namespace serviceuser_v1 { * defines a set of metrics. - For API calls, the quota.metric_rules maps * methods to metrics with corresponding costs. - The quota.limits defines * limits on the metrics, which will be used for quota checks at runtime. An - * example quota configuration in yaml format: quota: - name: - * apiWriteQpsPerProject metric: library.googleapis.com/write_calls - * unit: "1/min/{project}" # rate limit for consumer projects - * values: STANDARD: 10000 # The metric rules bind all methods - * to the read_calls metric, # except for the UpdateBook and DeleteBook - * methods. These two methods # are mapped to the write_calls metric, - * with the UpdateBook method # consuming at twice rate as the DeleteBook - * method. metric_rules: - selector: "*" metric_costs: + * example quota configuration in yaml format: quota: limits: - + * name: apiWriteQpsPerProject metric: + * library.googleapis.com/write_calls unit: "1/min/{project}" + * # rate limit for consumer projects values: STANDARD: 10000 + * # The metric rules bind all methods to the read_calls metric, # except + * for the UpdateBook and DeleteBook methods. These two methods # are + * mapped to the write_calls metric, with the UpdateBook method # + * consuming at twice rate as the DeleteBook method. metric_rules: - + * selector: "*" metric_costs: * library.googleapis.com/read_calls: 1 - selector: * google.example.library.v1.LibraryService.UpdateBook metric_costs: * library.googleapis.com/write_calls: 2 - selector: diff --git a/src/apis/speech/v1.ts b/src/apis/speech/v1.ts index a98ebeb3090..ecaf46ce242 100644 --- a/src/apis/speech/v1.ts +++ b/src/apis/speech/v1.ts @@ -66,6 +66,19 @@ export namespace speech_v1 { } } + /** + * The response message for Operations.ListOperations. + */ + export interface Schema$ListOperationsResponse { + /** + * The standard List next-page token. + */ + nextPageToken?: string; + /** + * A list of operations that matches the specified filter in the request. + */ + operations?: Schema$Operation[]; + } /** * The top-level message sent by the client for the `LongRunningRecognize` * method. @@ -123,8 +136,8 @@ export namespace speech_v1 { /** * Contains audio data in the encoding specified in the `RecognitionConfig`. * Either `content` or `uri` must be supplied. Supplying both or neither - * returns google.rpc.Code.INVALID_ARGUMENT. See [audio - * limits](https://cloud.google.com/speech/limits#content). + * returns google.rpc.Code.INVALID_ARGUMENT. See [content + * limits](/speech-to-text/quotas#content). */ export interface Schema$RecognitionAudio { /** @@ -135,10 +148,11 @@ export namespace speech_v1 { content?: string; /** * URI that points to a file that contains audio data bytes as specified in - * `RecognitionConfig`. Currently, only Google Cloud Storage URIs are - * supported, which must be specified in the following format: - * `gs://bucket_name/object_name` (other URI formats return - * google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request + * `RecognitionConfig`. The file must not be compressed (for example, gzip). + * Currently, only Google Cloud Storage URIs are supported, which must be + * specified in the following format: `gs://bucket_name/object_name` (other + * URI formats return google.rpc.Code.INVALID_ARGUMENT). For more + * information, see [Request * URIs](https://cloud.google.com/storage/docs/reference-uris). */ uri?: string; @@ -148,6 +162,16 @@ export namespace speech_v1 { * request. */ export interface Schema$RecognitionConfig { + /** + * *Optional* If 'true', adds punctuation to recognition result + * hypotheses. This feature is only available in select languages. Setting + * this for requests in other languages has no effect at all. The default + * 'false' value does not add punctuation to result hypotheses. + * Note: This is currently offered as an experimental service, complimentary + * to all users. In the future this may be exclusively available as a + * premium feature. + */ + enableAutomaticPunctuation?: boolean; /** * *Optional* If `true`, the top result includes a list of words and the * start and end time offsets (timestamps) for those words. If `false`, no @@ -164,8 +188,8 @@ export namespace speech_v1 { * *Required* The language of the supplied audio as a * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. * Example: "en-US". See [Language - * Support](https://cloud.google.com/speech/docs/languages) for a list of - * the currently supported language codes. + * Support](/speech-to-text/docs/languages) for a list of the currently + * supported language codes. */ languageCode?: string; /** @@ -177,6 +201,31 @@ export namespace speech_v1 { * one. */ maxAlternatives?: number; + /** + * *Optional* Which model to select for the given request. Select the model + * best suited to your domain to get best results. If a model is not + * explicitly specified, then we auto-select a model based on the parameters + * in the RecognitionConfig. <table> <tr> + * <td><b>Model</b></td> + * <td><b>Description</b></td> </tr> + * <tr> + * <td><code>command_and_search</code></td> + * <td>Best for short queries such as voice commands or voice + * search.</td> </tr> <tr> + * <td><code>phone_call</code></td> <td>Best + * for audio that originated from a phone call (typically recorded at an + * 8khz sampling rate).</td> </tr> <tr> + * <td><code>video</code></td> <td>Best + * for audio that originated from from video or includes multiple speakers. + * Ideally the audio is recorded at a 16khz or greater sampling + * rate. This is a premium model that costs more than the standard + * rate.</td> </tr> <tr> + * <td><code>default</code></td> <td>Best + * for audio that is not one of the specific audio models. For + * example, long-form audio. Ideally the audio is high-fidelity, recorded at + * a 16khz or greater sampling rate.</td> </tr> </table> + */ + model?: string; /** * *Optional* If set to `true`, the server will attempt to filter out * profanities, replacing all but the initial character in each filtered @@ -195,9 +244,25 @@ export namespace speech_v1 { */ sampleRateHertz?: number; /** - * *Optional* A means to provide context to assist the speech recognition. + * *Optional* array of SpeechContext. A means to provide context to assist + * the speech recognition. For more information, see [Phrase + * Hints](/speech-to-text/docs/basics#phrase-hints). */ speechContexts?: Schema$SpeechContext[]; + /** + * *Optional* Set to true to use an enhanced model for speech recognition. + * If `use_enhanced` is set to true and the `model` field is not set, then + * an appropriate enhanced model is chosen if: 1. project is eligible for + * requesting enhanced models 2. an enhanced model exists for the audio If + * `use_enhanced` is true and an enhanced version of the specified model + * does not exist, then the speech is recognized using the standard version + * of the specified model. Enhanced speech models require that you opt-in + * to data logging using instructions in the + * [documentation](/speech-to-text/docs/enable-data-logging). If you set + * `use_enhanced` to true and you have not enabled audio logging, then you + * will receive an error. + */ + useEnhanced?: boolean; } /** * The top-level message sent by the client for the `Recognize` method. @@ -237,7 +302,7 @@ export namespace speech_v1 { * words and phrases, for example, if specific commands are typically spoken * by the user. This can also be used to add additional words to the * vocabulary of the recognizer. See [usage - * limits](https://cloud.google.com/speech/limits#content). + * limits](/speech-to-text/quotas#content). */ phrases?: string[]; } @@ -261,8 +326,8 @@ export namespace speech_v1 { transcript?: string; /** * Output only. A list of word-specific information for each recognized - * word. Note: When enable_speaker_diarization is true, you will see all the - * words from the beginning of the audio. + * word. Note: When `enable_speaker_diarization` is true, you will see all + * the words from the beginning of the audio. */ words?: Schema$WordInfo[]; } @@ -439,6 +504,82 @@ export namespace speech_v1 { return createAPIRequest(parameters); } } + + + /** + * speech.operations.list + * @desc Lists operations that match the specified filter in the request. If + * the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: + * the `name` binding allows API services to override the binding to use + * different resource name schemes, such as `users/x/operations`. To + * override the binding, API services can add a binding such as + * `"/v1/{name=users/x}/operations"` to their service configuration. For + * backwards compatibility, the default name includes the operations + * collection id, however overriding users must ensure the name binding is + * the parent resource, without the operations collection id. + * @alias speech.operations.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The standard list filter. + * @param {string=} params.name The name of the operation's parent resource. + * @param {integer=} params.pageSize The standard list page size. + * @param {string=} params.pageToken The standard list page token. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list(params?: Params$Resource$Operations$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Operations$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Operations$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Operations$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Operations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Operations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://speech.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/operations').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: [], + pathParams: [], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Operations$Get { @@ -452,6 +593,29 @@ export namespace speech_v1 { */ name?: string; } + export interface Params$Resource$Operations$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The standard list filter. + */ + filter?: string; + /** + * The name of the operation's parent resource. + */ + name?: string; + /** + * The standard list page size. + */ + pageSize?: number; + /** + * The standard list page token. + */ + pageToken?: string; + } export class Resource$Speech { diff --git a/src/apis/speech/v1beta1.ts b/src/apis/speech/v1beta1.ts index 8a06a160a91..853e85605e0 100644 --- a/src/apis/speech/v1beta1.ts +++ b/src/apis/speech/v1beta1.ts @@ -80,6 +80,19 @@ export namespace speech_v1beta1 { */ config?: Schema$RecognitionConfig; } + /** + * The response message for Operations.ListOperations. + */ + export interface Schema$ListOperationsResponse { + /** + * The standard List next-page token. + */ + nextPageToken?: string; + /** + * A list of operations that matches the specified filter in the request. + */ + operations?: Schema$Operation[]; + } /** * This resource represents a long-running operation that is the result of a * network API call. @@ -389,6 +402,83 @@ export namespace speech_v1beta1 { return createAPIRequest(parameters); } } + + + /** + * speech.operations.list + * @desc Lists operations that match the specified filter in the request. If + * the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: + * the `name` binding allows API services to override the binding to use + * different resource name schemes, such as `users/x/operations`. To + * override the binding, API services can add a binding such as + * `"/v1/{name=users/x}/operations"` to their service configuration. For + * backwards compatibility, the default name includes the operations + * collection id, however overriding users must ensure the name binding is + * the parent resource, without the operations collection id. + * @alias speech.operations.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The standard list filter. + * @param {string=} params.name The name of the operation's parent resource. + * @param {integer=} params.pageSize The standard list page size. + * @param {string=} params.pageToken The standard list page token. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list(params?: Params$Resource$Operations$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Operations$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Operations$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Operations$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Operations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Operations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://speech.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/operations') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: [], + pathParams: [], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Operations$Get { @@ -402,6 +492,29 @@ export namespace speech_v1beta1 { */ name?: string; } + export interface Params$Resource$Operations$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The standard list filter. + */ + filter?: string; + /** + * The name of the operation's parent resource. + */ + name?: string; + /** + * The standard list page size. + */ + pageSize?: number; + /** + * The standard list page token. + */ + pageToken?: string; + } export class Resource$Speech { diff --git a/src/apis/sqladmin/README.md b/src/apis/sqladmin/README.md index 19d84fbcf16..d2793acf6fd 100644 --- a/src/apis/sqladmin/README.md +++ b/src/apis/sqladmin/README.md @@ -2,7 +2,7 @@ # @google/sqladmin -> Cloud SQL provides the Cloud SQL Admin API, a REST API for administering your instances programmatically. +> Creates and manages Cloud SQL instances, which provide fully managed MySQL or PostgreSQL databases. ## Installation diff --git a/src/apis/sqladmin/v1beta3.ts b/src/apis/sqladmin/v1beta3.ts deleted file mode 100644 index 61cc0b45614..00000000000 --- a/src/apis/sqladmin/v1beta3.ts +++ /dev/null @@ -1,3313 +0,0 @@ -/** - * Copyright 2015 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {AxiosPromise} from 'axios'; -import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; -import {BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; - -// tslint:disable: no-any -// tslint:disable: class-name -// tslint:disable: variable-name -// tslint:disable: jsdoc-format -// tslint:disable: no-namespace - -export namespace sqladmin_v1beta3 { - export interface Options extends GlobalOptions { - version: 'v1beta3'; - } - - /** - * Cloud SQL Admin API - * - * Cloud SQL provides the Cloud SQL Admin API, a REST API for administering - * your instances programmatically. - * - * @example - * const {google} = require('googleapis'); - * const sqladmin = google.sqladmin('v1beta3'); - * - * @namespace sqladmin - * @type {Function} - * @version v1beta3 - * @variation v1beta3 - * @param {object=} options Options for Sqladmin - */ - export class Sqladmin { - _options: GlobalOptions; - google?: GoogleConfigurable; - root = this; - - backupRuns: Resource$Backupruns; - flags: Resource$Flags; - instances: Resource$Instances; - operations: Resource$Operations; - sslCerts: Resource$Sslcerts; - tiers: Resource$Tiers; - - constructor(options: GlobalOptions, google?: GoogleConfigurable) { - this._options = options || {}; - this.google = google; - this.getRoot.bind(this); - - this.backupRuns = new Resource$Backupruns(this); - this.flags = new Resource$Flags(this); - this.instances = new Resource$Instances(this); - this.operations = new Resource$Operations(this); - this.sslCerts = new Resource$Sslcerts(this); - this.tiers = new Resource$Tiers(this); - } - - getRoot() { - return this.root; - } - } - - /** - * Database instance backup configuration. - */ - export interface Schema$BackupConfiguration { - /** - * Whether binary log is enabled. If backup configuration is disabled, - * binary log must be disabled as well. - */ - binaryLogEnabled?: boolean; - /** - * Whether this configuration is enabled. - */ - enabled?: boolean; - /** - * Identifier for this configuration. This gets generated automatically when - * a backup configuration is created. - */ - id?: string; - /** - * This is always sql#backupConfiguration. - */ - kind?: string; - /** - * Whether replication log archiving is enabled. Replication log archiving - * is required for the point-in-time recovery (PITR) feature. PostgreSQL - * instances only. - */ - replicationLogArchivingEnabled?: boolean; - /** - * Start time for the daily backup configuration in UTC timezone in the 24 - * hour format - HH:MM. - */ - startTime?: string; - } - /** - * A database instance backup run resource. - */ - export interface Schema$BackupRun { - /** - * Backup Configuration identifier. - */ - backupConfiguration?: string; - /** - * The due time of this run in UTC timezone in RFC 3339 format, for example - * 2012-11-15T16:19:00.094Z. - */ - dueTime?: string; - /** - * The time the backup operation completed in UTC timezone in RFC 3339 - * format, for example 2012-11-15T16:19:00.094Z. - */ - endTime?: string; - /** - * The time the run was enqueued in UTC timezone in RFC 3339 format, for - * example 2012-11-15T16:19:00.094Z. - */ - enqueuedTime?: string; - /** - * Information about why the backup operation failed. This is only present - * if the run has the FAILED status. - */ - error?: Schema$OperationError; - /** - * Name of the database instance. - */ - instance?: string; - /** - * This is always sql#backupRun. - */ - kind?: string; - /** - * The time the backup operation actually started in UTC timezone in RFC - * 3339 format, for example 2012-11-15T16:19:00.094Z. - */ - startTime?: string; - /** - * The status of this run. - */ - status?: string; - } - /** - * Backup run list results. - */ - export interface Schema$BackupRunsListResponse { - /** - * A list of backup runs in reverse chronological order of the enqueued - * time. - */ - items?: Schema$BackupRun[]; - /** - * This is always sql#backupRunsList. - */ - kind?: string; - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - */ - nextPageToken?: string; - } - /** - * Binary log coordinates. - */ - export interface Schema$BinLogCoordinates { - /** - * Name of the binary log file for a Cloud SQL instance. - */ - binLogFileName?: string; - /** - * Position (offset) within the binary log file. - */ - binLogPosition?: string; - /** - * This is always sql#binLogCoordinates. - */ - kind?: string; - } - /** - * Database instance clone context. - */ - export interface Schema$CloneContext { - /** - * Binary log coordinates, if specified, indentify the position up to which - * the source instance should be cloned. If not specified, the source - * instance is cloned up to the most recent binary log coordinates. - */ - binLogCoordinates?: Schema$BinLogCoordinates; - /** - * Name of the Cloud SQL instance to be created as a clone. - */ - destinationInstanceName?: string; - /** - * This is always sql#cloneContext. - */ - kind?: string; - /** - * The epoch timestamp, in milliseconds, of the time to which a - * point-in-time recovery (PITR) is performed. PostgreSQL instances only. - * For MySQL instances, use the binLogCoordinates property. - */ - pitrTimestampMs?: string; - /** - * Name of the Cloud SQL instance to be cloned. - */ - sourceInstanceName?: string; - } - /** - * MySQL flags for Cloud SQL instances. - */ - export interface Schema$DatabaseFlags { - /** - * The name of the flag. These flags are passed at instance startup, so - * include both MySQL server options and MySQL system variables. Flags - * should be specified with underscores, not hyphens. For more information, - * see Configuring MySQL Flags in the Google Cloud SQL documentation, as - * well as the official MySQL documentation for server options and system - * variables. - */ - name?: string; - /** - * The value of the flag. Booleans should be set to on for true and off for - * false. This field must be omitted if the flag doesn't take a value. - */ - value?: string; - } - /** - * A Cloud SQL instance resource. - */ - export interface Schema$DatabaseInstance { - /** - * Connection name of the Cloud SQL instance used in connection strings. - */ - connectionName?: string; - /** - * The current disk usage of the instance in bytes. - */ - currentDiskSize?: string; - /** - * The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. - * Defaults to MYSQL_5_5. The databaseVersion cannot be changed after - * instance creation. - */ - databaseVersion?: string; - /** - * HTTP 1.1 Entity tag for the resource. - */ - etag?: string; - /** - * Name of the Cloud SQL instance. This does not include the project ID. - */ - instance?: string; - /** - * The instance type. This can be one of the following. CLOUD_SQL_INSTANCE: - * Regular Cloud SQL instance. READ_REPLICA_INSTANCE: Cloud SQL instance - * acting as a read-replica. - */ - instanceType?: string; - /** - * The assigned IP addresses for the instance. - */ - ipAddresses?: Schema$IpMapping[]; - /** - * The IPv6 address assigned to the instance. - */ - ipv6Address?: string; - /** - * This is always sql#instance. - */ - kind?: string; - /** - * The name of the instance which will act as master in the replication - * setup. - */ - masterInstanceName?: string; - /** - * The maximum disk size of the instance in bytes. - */ - maxDiskSize?: string; - /** - * The project ID of the project containing the Cloud SQL instance. The - * Google apps domain is prefixed if applicable. - */ - project?: string; - /** - * The geographical region. Can be us-central, asia-east1 or europe-west1. - * Defaults to us-central. The region can not be changed after instance - * creation. - */ - region?: string; - /** - * The replicas of the instance. - */ - replicaNames?: string[]; - /** - * SSL configuration. - */ - serverCaCert?: Schema$SslCert; - /** - * The service account email address assigned to the instance. - */ - serviceAccountEmailAddress?: string; - /** - * The user settings. - */ - settings?: Schema$Settings; - /** - * The current serving state of the Cloud SQL instance. This can be one of - * the following. RUNNABLE: The instance is running, or is ready to run when - * accessed. SUSPENDED: The instance is not available, for example due to - * problems with billing. PENDING_CREATE: The instance is being created. - * MAINTENANCE: The instance is down for maintenance. UNKNOWN_STATE: The - * state of the instance is unknown. - */ - state?: string; - } - /** - * Database instance export context. - */ - export interface Schema$ExportContext { - /** - * Databases (for example, guestbook) from which the export is made. If - * unspecified, all databases are exported. - */ - database?: string[]; - /** - * This is always sql#exportContext. - */ - kind?: string; - /** - * Tables to export, or that were exported, from the specified database. If - * you specify tables, specify one and only one database. - */ - table?: string[]; - /** - * The path to the file in Google Cloud Storage where the export will be - * stored, or where it was already stored. The URI is in the form - * gs://bucketName/fileName. If the file already exists, the operation - * fails. If the filename ends with .gz, the contents are compressed. - */ - uri?: string; - } - /** - * A Google Cloud SQL service flag resource. - */ - export interface Schema$Flag { - /** - * For STRING flags, a list of strings that the value can be set to. - */ - allowedStringValues?: string[]; - /** - * The database version this flag applies to. Currently this can only be - * [MYSQL_5_5]. - */ - appliesTo?: string[]; - /** - * This is always sql#flag. - */ - kind?: string; - /** - * For INTEGER flags, the maximum allowed value. - */ - maxValue?: string; - /** - * For INTEGER flags, the minimum allowed value. - */ - minValue?: string; - /** - * This is the name of the flag. Flag names always use underscores, not - * hyphens, e.g. max_allowed_packet - */ - name?: string; - /** - * The type of the flag. Flags are typed to being BOOLEAN, STRING, INTEGER - * or NONE. NONE is used for flags which do not take a value, such as - * skip_grant_tables. - */ - type?: string; - } - /** - * Flags list response. - */ - export interface Schema$FlagsListResponse { - /** - * List of flags. - */ - items?: Schema$Flag[]; - /** - * This is always sql#flagsList. - */ - kind?: string; - } - /** - * Database instance import context. - */ - export interface Schema$ImportContext { - /** - * The database (for example, guestbook) to which the import is made. If not - * set, it is assumed that the database is specified in the file to be - * imported. - */ - database?: string; - /** - * This is always sql#importContext. - */ - kind?: string; - /** - * A path to the MySQL dump file in Google Cloud Storage from which the - * import is made. The URI is in the form gs://bucketName/fileName. - * Compressed gzip files (.gz) are also supported. - */ - uri?: string[]; - } - /** - * An Operations resource contains information about database instance - * operations such as create, delete, and restart. Operations resources are - * created in response to operations that were initiated; you never create - * them directly. - */ - export interface Schema$InstanceOperation { - /** - * The time this operation finished in UTC timezone in RFC 3339 format, for - * example 2012-11-15T16:19:00.094Z. - */ - endTime?: string; - /** - * The time this operation was enqueued in UTC timezone in RFC 3339 format, - * for example 2012-11-15T16:19:00.094Z. - */ - enqueuedTime?: string; - /** - * The error(s) encountered by this operation. Only set if the operation - * results in an error. - */ - error?: Schema$OperationError[]; - /** - * The context for export operation, if applicable. - */ - exportContext?: Schema$ExportContext; - /** - * The context for import operation, if applicable. - */ - importContext?: Schema$ImportContext; - /** - * Name of the database instance. - */ - instance?: string; - /** - * This is always sql#instanceOperation. - */ - kind?: string; - /** - * An identifier that uniquely identifies the operation. You can use this - * identifier to retrieve the Operations resource that has information about - * the operation. - */ - operation?: string; - /** - * The type of the operation. Valid values are CREATE, DELETE, UPDATE, - * RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME. - */ - operationType?: string; - /** - * The time this operation actually started in UTC timezone in RFC 3339 - * format, for example 2012-11-15T16:19:00.094Z. - */ - startTime?: string; - /** - * The state of an operation. Valid values are PENDING, RUNNING, DONE, - * UNKNOWN. - */ - state?: string; - /** - * The email address of the user who initiated this operation. - */ - userEmailAddress?: string; - } - /** - * Database instance clone request. - */ - export interface Schema$InstancesCloneRequest { - /** - * Contains details about the clone operation. - */ - cloneContext?: Schema$CloneContext; - } - /** - * Database instance clone response. - */ - export interface Schema$InstancesCloneResponse { - /** - * This is always sql#instancesClone. - */ - kind?: string; - /** - * An unique identifier for the operation associated with the cloned - * instance. You can use this identifier to retrieve the Operations - * resource, which has information about the operation. - */ - operation?: string; - } - /** - * Database instance delete response. - */ - export interface Schema$InstancesDeleteResponse { - /** - * This is always sql#instancesDelete. - */ - kind?: string; - /** - * An identifier that uniquely identifies the operation. You can use this - * identifier to retrieve the Operations resource that has information about - * the operation. - */ - operation?: string; - } - /** - * Database instance set root password request. - */ - export interface Schema$InstanceSetRootPasswordRequest { - /** - * Set Root Password Context. - */ - setRootPasswordContext?: Schema$SetRootPasswordContext; - } - /** - * Database instance export request. - */ - export interface Schema$InstancesExportRequest { - /** - * Contains details about the export operation. - */ - exportContext?: Schema$ExportContext; - } - /** - * Database instance export response. - */ - export interface Schema$InstancesExportResponse { - /** - * This is always sql#instancesExport. - */ - kind?: string; - /** - * An identifier that uniquely identifies the operation. You can use this - * identifier to retrieve the Operations resource that has information about - * the operation. - */ - operation?: string; - } - /** - * Database instance import request. - */ - export interface Schema$InstancesImportRequest { - /** - * Contains details about the import operation. - */ - importContext?: Schema$ImportContext; - } - /** - * Database instance import response. - */ - export interface Schema$InstancesImportResponse { - /** - * This is always sql#instancesImport. - */ - kind?: string; - /** - * An identifier that uniquely identifies the operation. You can use this - * identifier to retrieve the Operations resource that has information about - * the operation. - */ - operation?: string; - } - /** - * Database instance insert response. - */ - export interface Schema$InstancesInsertResponse { - /** - * This is always sql#instancesInsert. - */ - kind?: string; - /** - * An identifier that uniquely identifies the operation. You can use this - * identifier to retrieve the Operations resource that has information about - * the operation. - */ - operation?: string; - } - /** - * Database instances list response. - */ - export interface Schema$InstancesListResponse { - /** - * List of database instance resources. - */ - items?: Schema$DatabaseInstance[]; - /** - * This is always sql#instancesList. - */ - kind?: string; - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - */ - nextPageToken?: string; - } - /** - * Database promote read replica response. - */ - export interface Schema$InstancesPromoteReplicaResponse { - /** - * This is always sql#instancesPromoteReplica. - */ - kind?: string; - /** - * An identifier that uniquely identifies the operation. You can use this - * identifier to retrieve the Operations resource that has information about - * the operation. - */ - operation?: string; - } - /** - * Database instance resetSslConfig response. - */ - export interface Schema$InstancesResetSslConfigResponse { - /** - * This is always sql#instancesResetSslConfig. - */ - kind?: string; - /** - * An identifier that uniquely identifies the operation. You can use this - * identifier to retrieve the Operations resource that has information about - * the operation. All ssl client certificates will be deleted and a new - * server certificate will be created. Does not take effect until the next - * instance restart. - */ - operation?: string; - } - /** - * Database instance restart response. - */ - export interface Schema$InstancesRestartResponse { - /** - * This is always sql#instancesRestart. - */ - kind?: string; - /** - * An identifier that uniquely identifies the operation. You can use this - * identifier to retrieve the Operations resource that has information about - * the operation. - */ - operation?: string; - } - /** - * Database instance restore backup response. - */ - export interface Schema$InstancesRestoreBackupResponse { - /** - * This is always sql#instancesRestoreBackup. - */ - kind?: string; - /** - * An identifier that uniquely identifies the operation. You can use this - * identifier to retrieve the Operations resource that has information about - * the operation. - */ - operation?: string; - } - /** - * Database instance set root password response. - */ - export interface Schema$InstancesSetRootPasswordResponse { - /** - * This is always sql#instancesSetRootPassword. - */ - kind?: string; - /** - * An identifier that uniquely identifies the operation. You can use this - * identifier to retrieve the Operations resource that has information about - * the operation. - */ - operation?: string; - } - /** - * Database instance update response. - */ - export interface Schema$InstancesUpdateResponse { - /** - * This is always sql#instancesUpdate. - */ - kind?: string; - /** - * An identifier that uniquely identifies the operation. You can use this - * identifier to retrieve information about the operation. - */ - operation?: string; - } - /** - * IP Management configuration. - */ - export interface Schema$IpConfiguration { - /** - * The list of external networks that are allowed to connect to the instance - * using the IP. In CIDR notation, also known as 'slash' notation - * (e.g. 192.168.100.0/24). - */ - authorizedNetworks?: string[]; - /** - * Whether the instance should be assigned an IP address or not. - */ - enabled?: boolean; - /** - * This is always sql#ipConfiguration. - */ - kind?: string; - /** - * Whether SSL connections over IP should be enforced or not. - */ - requireSsl?: boolean; - } - /** - * Database instance IP Mapping. - */ - export interface Schema$IpMapping { - /** - * The IP address assigned. - */ - ipAddress?: string; - /** - * The due time for this IP to be retired in RFC 3339 format, for example - * 2012-11-15T16:19:00.094Z. This field is only available when the IP is - * scheduled to be retired. - */ - timeToRetire?: string; - } - /** - * Preferred location. This specifies where a Cloud SQL instance should - * preferably be located, either in a specific Compute Engine zone, or - * co-located with an App Engine application. Note that if the preferred - * location is not available, the instance will be located as close as - * possible within the region. Only one location may be specified. - */ - export interface Schema$LocationPreference { - /** - * The App Engine application to follow, it must be in the same region as - * the Cloud SQL instance. - */ - followGaeApplication?: string; - /** - * This is always sql#locationPreference. - */ - kind?: string; - /** - * The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, - * etc.). - */ - zone?: string; - } - /** - * Database instance operation error. - */ - export interface Schema$OperationError { - /** - * Identifies the specific error that occurred. - */ - code?: string; - /** - * This is always sql#operationError. - */ - kind?: string; - } - /** - * Database instance list operations response. - */ - export interface Schema$OperationsListResponse { - /** - * List of operation resources. - */ - items?: Schema$InstanceOperation[]; - /** - * This is always sql#operationsList. - */ - kind?: string; - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - */ - nextPageToken?: string; - } - /** - * Database instance set root password context. - */ - export interface Schema$SetRootPasswordContext { - /** - * This is always sql#setRootUserContext. - */ - kind?: string; - /** - * The password for the root user. - */ - password?: string; - } - /** - * Database instance settings. - */ - export interface Schema$Settings { - /** - * The activation policy for this instance. This specifies when the instance - * should be activated and is applicable only when the instance state is - * RUNNABLE. This can be one of the following. ALWAYS: The instance should - * always be active. NEVER: The instance should never be activated. - * ON_DEMAND: The instance is activated upon receiving requests. - */ - activationPolicy?: string; - /** - * The App Engine app IDs that can access this instance. - */ - authorizedGaeApplications?: string[]; - /** - * The daily backup configuration for the instance. - */ - backupConfiguration?: Schema$BackupConfiguration[]; - /** - * The database flags passed to the instance at startup. - */ - databaseFlags?: Schema$DatabaseFlags[]; - /** - * Configuration specific to read replica instance. Indicates whether - * replication is enabled or not. - */ - databaseReplicationEnabled?: boolean; - /** - * The settings for IP Management. This allows to enable or disable the - * instance IP and manage which external networks can connect to the - * instance. - */ - ipConfiguration?: Schema$IpConfiguration; - /** - * This is always sql#settings. - */ - kind?: string; - /** - * The location preference settings. This allows the instance to be located - * as near as possible to either an App Engine app or GCE zone for better - * performance. - */ - locationPreference?: Schema$LocationPreference; - /** - * The pricing plan for this instance. This can be either PER_USE or - * PACKAGE. - */ - pricingPlan?: string; - /** - * The type of replication this instance uses. This can be either - * ASYNCHRONOUS or SYNCHRONOUS. - */ - replicationType?: string; - /** - * The version of instance settings. This is a required field for update - * method to make sure concurrent updates are handled properly. During - * update, use the most recent settingsVersion value for this instance and - * do not try to update this value. - */ - settingsVersion?: string; - /** - * The tier of service for this instance, for example D1, D2. For more - * information, see pricing. - */ - tier?: string; - } - /** - * SslCerts Resource - */ - export interface Schema$SslCert { - /** - * PEM representation. - */ - cert?: string; - /** - * Serial number, as extracted from the certificate. - */ - certSerialNumber?: string; - /** - * User supplied name. Constrained to [a-zA-Z.-_ ]+. - */ - commonName?: string; - /** - * Time when the certificate was created. - */ - createTime?: string; - /** - * Time when the certificate expires. - */ - expirationTime?: string; - /** - * Name of the database instance. - */ - instance?: string; - /** - * This is always sql#sslCert. - */ - kind?: string; - /** - * Sha1 Fingerprint. - */ - sha1Fingerprint?: string; - } - /** - * SslCertDetail. - */ - export interface Schema$SslCertDetail { - /** - * The public information about the cert. - */ - certInfo?: Schema$SslCert; - /** - * The private key for the client cert, in pem format. Keep private in order - * to protect your security. - */ - certPrivateKey?: string; - } - /** - * SslCert delete response. - */ - export interface Schema$SslCertsDeleteResponse { - /** - * This is always sql#sslCertsDelete. - */ - kind?: string; - /** - * An identifier that uniquely identifies the operation. You can use this - * identifier to retrieve the Operations resource that has information about - * the operation. - */ - operation?: string; - } - /** - * SslCerts insert request. - */ - export interface Schema$SslCertsInsertRequest { - /** - * User supplied name. Must be a distinct name from the other certificates - * for this instance. New certificates will not be usable until the instance - * is restarted. - */ - commonName?: string; - } - /** - * SslCert insert response. - */ - export interface Schema$SslCertsInsertResponse { - /** - * The new client certificate and private key. The new certificate will not - * work until the instance is restarted. - */ - clientCert?: Schema$SslCertDetail; - /** - * This is always sql#sslCertsInsert. - */ - kind?: string; - /** - * The server Certificate Authority's certificate. If this is missing - * you can force a new one to be generated by calling resetSslConfig method - * on instances resource.. - */ - serverCaCert?: Schema$SslCert; - } - /** - * SslCerts list response. - */ - export interface Schema$SslCertsListResponse { - /** - * List of client certificates for the instance. - */ - items?: Schema$SslCert[]; - /** - * This is always sql#sslCertsList. - */ - kind?: string; - } - /** - * A Google Cloud SQL service tier resource. - */ - export interface Schema$Tier { - /** - * The maximum disk size of this tier in bytes. - */ - DiskQuota?: string; - /** - * This is always sql#tier. - */ - kind?: string; - /** - * The maximum RAM usage of this tier in bytes. - */ - RAM?: string; - /** - * The applicable regions for this tier. - */ - region?: string[]; - /** - * An identifier for the service tier, for example D1, D2 etc. For related - * information, see Pricing. - */ - tier?: string; - } - /** - * Tiers list response. - */ - export interface Schema$TiersListResponse { - /** - * List of tiers. - */ - items?: Schema$Tier[]; - /** - * This is always sql#tiersList. - */ - kind?: string; - } - - - export class Resource$Backupruns { - root: Sqladmin; - constructor(root: Sqladmin) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * sql.backupRuns.get - * @desc Retrieves information about a specified backup run for a Cloud SQL - * instance. - * @alias sql.backupRuns.get - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.backupConfiguration Identifier for the backup - * configuration. This gets generated automatically when a backup - * configuration is created. - * @param {string} params.dueTime The start time of the four-hour backup - * window. The backup can occur any time in the window. The time is in - * RFC 3339 format, for example 2012-11-15T16:19:00.094Z. - * @param {string} params.instance Cloud SQL instance ID. This does not - * include the project ID. - * @param {string} params.project Project ID of the project that contains - * the instance. - * @param {object} [options] Optionally override request options, such as - * `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - get(params?: Params$Resource$Backupruns$Get, - options?: MethodOptions): AxiosPromise; - get(params: Params$Resource$Backupruns$Get, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - get(params: Params$Resource$Backupruns$Get, - callback: BodyResponseCallback): void; - get(callback: BodyResponseCallback): void; - get(paramsOrCallback?: Params$Resource$Backupruns$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Backupruns$Get; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Backupruns$Get; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/sql/v1beta3/projects/{project}/instances/{instance}/backupRuns/{backupConfiguration}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: - ['project', 'instance', 'backupConfiguration', 'dueTime'], - pathParams: ['backupConfiguration', 'instance', 'project'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * sql.backupRuns.list - * @desc Lists all backup runs associated with a Cloud SQL instance. - * @alias sql.backupRuns.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.backupConfiguration Identifier for the backup - * configuration. This gets generated automatically when a backup - * configuration is created. - * @param {string} params.instance Cloud SQL instance ID. This does not - * include the project ID. - * @param {integer=} params.maxResults Maximum number of backup runs per - * response. - * @param {string=} params.pageToken A previously-returned page token - * representing part of the larger set of results to view. - * @param {string} params.project Project ID of the project that contains - * the instance. - * @param {object} [options] Optionally override request options, such as - * `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list(params?: Params$Resource$Backupruns$List, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Backupruns$List, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Backupruns$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Backupruns$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Backupruns$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Backupruns$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/sql/v1beta3/projects/{project}/instances/{instance}/backupRuns') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['project', 'instance', 'backupConfiguration'], - pathParams: ['instance', 'project'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Backupruns$Get { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Identifier for the backup configuration. This gets generated - * automatically when a backup configuration is created. - */ - backupConfiguration?: string; - /** - * The start time of the four-hour backup window. The backup can occur any - * time in the window. The time is in RFC 3339 format, for example - * 2012-11-15T16:19:00.094Z. - */ - dueTime?: string; - /** - * Cloud SQL instance ID. This does not include the project ID. - */ - instance?: string; - /** - * Project ID of the project that contains the instance. - */ - project?: string; - } - export interface Params$Resource$Backupruns$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Identifier for the backup configuration. This gets generated - * automatically when a backup configuration is created. - */ - backupConfiguration?: string; - /** - * Cloud SQL instance ID. This does not include the project ID. - */ - instance?: string; - /** - * Maximum number of backup runs per response. - */ - maxResults?: number; - /** - * A previously-returned page token representing part of the larger set of - * results to view. - */ - pageToken?: string; - /** - * Project ID of the project that contains the instance. - */ - project?: string; - } - - - export class Resource$Flags { - root: Sqladmin; - constructor(root: Sqladmin) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * sql.flags.list - * @desc Lists all database flags that can be set for Google Cloud SQL - * instances. - * @alias sql.flags.list - * @memberOf! () - * - * @param {object=} params Parameters for request - * @param {object} [options] Optionally override request options, such as - * `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list(params?: Params$Resource$Flags$List, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Flags$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Flags$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Flags$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Flags$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Flags$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/sql/v1beta3/flags') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: [], - pathParams: [], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Flags$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - } - - - export class Resource$Instances { - root: Sqladmin; - constructor(root: Sqladmin) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * sql.instances.clone - * @desc Creates a Cloud SQL instance as a clone of a source instance. - * @alias sql.instances.clone - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.project Project ID of the source as well as the - * clone Cloud SQL instance. - * @param {().InstancesCloneRequest} params.resource Request body data - * @param {object} [options] Optionally override request options, such as - * `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - clone(params?: Params$Resource$Instances$Clone, options?: MethodOptions): - AxiosPromise; - clone( - params: Params$Resource$Instances$Clone, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): void; - clone( - params: Params$Resource$Instances$Clone, - callback: BodyResponseCallback): void; - clone(callback: BodyResponseCallback): void; - clone( - paramsOrCallback?: Params$Resource$Instances$Clone| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Instances$Clone; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Clone; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/sql/v1beta3/projects/{project}/instances/clone') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' - }, - options), - params, - requiredParams: ['project'], - pathParams: ['project'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * sql.instances.delete - * @desc Deletes a Cloud SQL instance. - * @alias sql.instances.delete - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.instance Cloud SQL instance ID. This does not - * include the project ID. - * @param {string} params.project Project ID of the project that contains - * the instance to be deleted. - * @param {object} [options] Optionally override request options, such as - * `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - delete(params?: Params$Resource$Instances$Delete, options?: MethodOptions): - AxiosPromise; - delete( - params: Params$Resource$Instances$Delete, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): void; - delete( - params: Params$Resource$Instances$Delete, - callback: BodyResponseCallback): void; - delete(callback: BodyResponseCallback): - void; - delete( - paramsOrCallback?: Params$Resource$Instances$Delete| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Instances$Delete; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Delete; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + - '/sql/v1beta3/projects/{project}/instances/{instance}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE' - }, - options), - params, - requiredParams: ['project', 'instance'], - pathParams: ['instance', 'project'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * sql.instances.export - * @desc Exports data from a Cloud SQL instance to a Google Cloud Storage - * bucket as a MySQL dump file. - * @alias sql.instances.export - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.instance Cloud SQL instance ID. This does not - * include the project ID. - * @param {string} params.project Project ID of the project that contains - * the instance to be exported. - * @param {().InstancesExportRequest} params.resource Request body data - * @param {object} [options] Optionally override request options, such as - * `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - export(params?: Params$Resource$Instances$Export, options?: MethodOptions): - AxiosPromise; - export( - params: Params$Resource$Instances$Export, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): void; - export( - params: Params$Resource$Instances$Export, - callback: BodyResponseCallback): void; - export(callback: BodyResponseCallback): - void; - export( - paramsOrCallback?: Params$Resource$Instances$Export| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Instances$Export; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Export; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/sql/v1beta3/projects/{project}/instances/{instance}/export') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' - }, - options), - params, - requiredParams: ['project', 'instance'], - pathParams: ['instance', 'project'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * sql.instances.get - * @desc Retrieves information about a Cloud SQL instance. - * @alias sql.instances.get - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.instance Database instance ID. This does not - * include the project ID. - * @param {string} params.project Project ID of the project that contains - * the instance. - * @param {object} [options] Optionally override request options, such as - * `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - get(params?: Params$Resource$Instances$Get, - options?: MethodOptions): AxiosPromise; - get(params: Params$Resource$Instances$Get, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - get(params: Params$Resource$Instances$Get, - callback: BodyResponseCallback): void; - get(callback: BodyResponseCallback): void; - get(paramsOrCallback?: Params$Resource$Instances$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Instances$Get; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Get; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + - '/sql/v1beta3/projects/{project}/instances/{instance}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['project', 'instance'], - pathParams: ['instance', 'project'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - -/** - * sql.instances.import - * @desc Imports data into a Cloud SQL instance from a MySQL dump file stored in - * a Google Cloud Storage bucket. - * @alias sql.instances.import - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.instance Cloud SQL instance ID. This does not include - * the project ID. - * @param {string} params.project Project ID of the project that contains the - * instance. - * @param {().InstancesImportRequest} params.resource Request body data - * @param {object} [options] Optionally override request options, such as `url`, - * `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ -import(params?: Params$Resource$Instances$Import, options?: MethodOptions): AxiosPromise; -import(params: Params$Resource$Instances$Import, options: MethodOptions|BodyResponseCallback, callback: BodyResponseCallback): void; -import(params: Params$Resource$Instances$Import, callback: BodyResponseCallback): void; -import(callback: BodyResponseCallback): void; -import(paramsOrCallback?: Params$Resource$Instances$Import|BodyResponseCallback, optionsOrCallback?: MethodOptions|BodyResponseCallback, callback?: BodyResponseCallback): void|AxiosPromise {let params = (paramsOrCallback || {}) as Params$Resource$Instances$Import; let options = (optionsOrCallback || {}) as MethodOptions; - - if(typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Import; - options = {}; - } - - if(typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; const parameters = {options: Object.assign({url: (rootUrl + '/sql/v1beta3/projects/{project}/instances/{instance}/import').replace(/([^:]\/)\/+/g, '$1'), method: 'POST'}, options), params, requiredParams: ['project', 'instance'], pathParams: ['instance', 'project'], context: this.getRoot()}; if(callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - }} - - - /** - * sql.instances.insert - * @desc Creates a new Cloud SQL instance. - * @alias sql.instances.insert - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.project Project ID of the project to which the newly created Cloud SQL instances should belong. - * @param {().DatabaseInstance} params.resource Request body data - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - insert(params?: Params$Resource$Instances$Insert, options?: MethodOptions): AxiosPromise; - insert( - params: Params$Resource$Instances$Insert, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): void; - insert( - params: Params$Resource$Instances$Insert, - callback: BodyResponseCallback): void; - insert(callback: BodyResponseCallback): - void; - insert( - paramsOrCallback?: Params$Resource$Instances$Insert| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Instances$Insert; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Insert; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/sql/v1beta3/projects/{project}/instances') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' - }, - options), - params, - requiredParams: ['project'], - pathParams: ['project'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * sql.instances.list - * @desc Lists instances for a given project, in alphabetical order by - * instance name. - * @alias sql.instances.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {integer=} params.maxResults The maximum number of results to - * return per response. - * @param {string=} params.pageToken A previously-returned page token - * representing part of the larger set of results to view. - * @param {string} params.project Project ID of the project for which to - * list Cloud SQL instances. - * @param {object} [options] Optionally override request options, such as - * `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list(params?: Params$Resource$Instances$List, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Instances$List, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Instances$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Instances$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Instances$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Instances$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/sql/v1beta3/projects/{project}/instances') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['project'], - pathParams: ['project'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * sql.instances.patch - * @desc Updates the settings of a Cloud SQL instance. This method supports - * patch semantics. - * @alias sql.instances.patch - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.instance Cloud SQL instance ID. This does not - * include the project ID. - * @param {string} params.project Project ID of the project that contains - * the instance. - * @param {().DatabaseInstance} params.resource Request body data - * @param {object} [options] Optionally override request options, such as - * `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - patch(params?: Params$Resource$Instances$Patch, options?: MethodOptions): - AxiosPromise; - patch( - params: Params$Resource$Instances$Patch, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): void; - patch( - params: Params$Resource$Instances$Patch, - callback: BodyResponseCallback): void; - patch(callback: BodyResponseCallback): void; - patch( - paramsOrCallback?: Params$Resource$Instances$Patch| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Instances$Patch; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Patch; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + - '/sql/v1beta3/projects/{project}/instances/{instance}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH' - }, - options), - params, - requiredParams: ['project', 'instance'], - pathParams: ['instance', 'project'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * sql.instances.promoteReplica - * @desc Promotes the read replica instance to be a stand-alone Cloud SQL - * instance. - * @alias sql.instances.promoteReplica - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.instance Cloud SQL read replica instance name. - * @param {string} params.project ID of the project that contains the read - * replica. - * @param {object} [options] Optionally override request options, such as - * `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - promoteReplica( - params?: Params$Resource$Instances$Promotereplica, - options?: MethodOptions): - AxiosPromise; - promoteReplica( - params: Params$Resource$Instances$Promotereplica, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): - void; - promoteReplica( - params: Params$Resource$Instances$Promotereplica, - callback: BodyResponseCallback): - void; - promoteReplica( - callback: BodyResponseCallback): - void; - promoteReplica( - paramsOrCallback?: Params$Resource$Instances$Promotereplica| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: - BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Instances$Promotereplica; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Promotereplica; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/sql/v1beta3/projects/{project}/instances/{instance}/promoteReplica') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' - }, - options), - params, - requiredParams: ['project', 'instance'], - pathParams: ['instance', 'project'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest( - parameters, callback); - } else { - return createAPIRequest( - parameters); - } - } - - - /** - * sql.instances.resetSslConfig - * @desc Deletes all client certificates and generates a new server SSL - * certificate for a Cloud SQL instance. - * @alias sql.instances.resetSslConfig - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.instance Cloud SQL instance ID. This does not - * include the project ID. - * @param {string} params.project Project ID of the project that contains - * the instance. - * @param {object} [options] Optionally override request options, such as - * `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - resetSslConfig( - params?: Params$Resource$Instances$Resetsslconfig, - options?: MethodOptions): - AxiosPromise; - resetSslConfig( - params: Params$Resource$Instances$Resetsslconfig, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): - void; - resetSslConfig( - params: Params$Resource$Instances$Resetsslconfig, - callback: BodyResponseCallback): - void; - resetSslConfig( - callback: BodyResponseCallback): - void; - resetSslConfig( - paramsOrCallback?: Params$Resource$Instances$Resetsslconfig| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: - BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Instances$Resetsslconfig; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Resetsslconfig; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/sql/v1beta3/projects/{project}/instances/{instance}/resetSslConfig') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' - }, - options), - params, - requiredParams: ['project', 'instance'], - pathParams: ['instance', 'project'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest( - parameters, callback); - } else { - return createAPIRequest( - parameters); - } - } - - - /** - * sql.instances.restart - * @desc Restarts a Cloud SQL instance. - * @alias sql.instances.restart - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.instance Cloud SQL instance ID. This does not - * include the project ID. - * @param {string} params.project Project ID of the project that contains - * the instance to be restarted. - * @param {object} [options] Optionally override request options, such as - * `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - restart( - params?: Params$Resource$Instances$Restart, - options?: MethodOptions): AxiosPromise; - restart( - params: Params$Resource$Instances$Restart, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): void; - restart( - params: Params$Resource$Instances$Restart, - callback: BodyResponseCallback): void; - restart(callback: BodyResponseCallback): - void; - restart( - paramsOrCallback?: Params$Resource$Instances$Restart| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Instances$Restart; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Restart; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/sql/v1beta3/projects/{project}/instances/{instance}/restart') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' - }, - options), - params, - requiredParams: ['project', 'instance'], - pathParams: ['instance', 'project'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * sql.instances.restoreBackup - * @desc Restores a backup of a Cloud SQL instance. - * @alias sql.instances.restoreBackup - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.backupConfiguration The identifier of the backup - * configuration. This gets generated automatically when a backup - * configuration is created. - * @param {string} params.dueTime The start time of the four-hour backup - * window. The backup can occur any time in the window. The time is in - * RFC 3339 format, for example 2012-11-15T16:19:00.094Z. - * @param {string} params.instance Cloud SQL instance ID. This does not - * include the project ID. - * @param {string} params.project Project ID of the project that contains - * the instance. - * @param {object} [options] Optionally override request options, such as - * `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - restoreBackup( - params?: Params$Resource$Instances$Restorebackup, - options?: MethodOptions): - AxiosPromise; - restoreBackup( - params: Params$Resource$Instances$Restorebackup, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): - void; - restoreBackup( - params: Params$Resource$Instances$Restorebackup, - callback: BodyResponseCallback): - void; - restoreBackup( - callback: BodyResponseCallback): - void; - restoreBackup( - paramsOrCallback?: Params$Resource$Instances$Restorebackup| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Instances$Restorebackup; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Restorebackup; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/sql/v1beta3/projects/{project}/instances/{instance}/restoreBackup') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' - }, - options), - params, - requiredParams: - ['project', 'instance', 'backupConfiguration', 'dueTime'], - pathParams: ['instance', 'project'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest( - parameters, callback); - } else { - return createAPIRequest( - parameters); - } - } - - - /** - * sql.instances.setRootPassword - * @desc Sets the password for the root user of the specified Cloud SQL - * instance. - * @alias sql.instances.setRootPassword - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.instance Cloud SQL instance ID. This does not - * include the project ID. - * @param {string} params.project Project ID of the project that contains - * the instance. - * @param {().InstanceSetRootPasswordRequest} params.resource Request body - * data - * @param {object} [options] Optionally override request options, such as - * `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - setRootPassword( - params?: Params$Resource$Instances$Setrootpassword, - options?: MethodOptions): - AxiosPromise; - setRootPassword( - params: Params$Resource$Instances$Setrootpassword, - options: MethodOptions| - BodyResponseCallback, - callback: - BodyResponseCallback): - void; - setRootPassword( - params: Params$Resource$Instances$Setrootpassword, - callback: - BodyResponseCallback): - void; - setRootPassword( - callback: - BodyResponseCallback): - void; - setRootPassword( - paramsOrCallback?: Params$Resource$Instances$Setrootpassword| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: - BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Instances$Setrootpassword; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Setrootpassword; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/sql/v1beta3/projects/{project}/instances/{instance}/setRootPassword') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' - }, - options), - params, - requiredParams: ['project', 'instance'], - pathParams: ['instance', 'project'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest( - parameters, callback); - } else { - return createAPIRequest( - parameters); - } - } - - - /** - * sql.instances.update - * @desc Updates the settings of a Cloud SQL instance. - * @alias sql.instances.update - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.instance Cloud SQL instance ID. This does not - * include the project ID. - * @param {string} params.project Project ID of the project that contains - * the instance. - * @param {().DatabaseInstance} params.resource Request body data - * @param {object} [options] Optionally override request options, such as - * `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - update(params?: Params$Resource$Instances$Update, options?: MethodOptions): - AxiosPromise; - update( - params: Params$Resource$Instances$Update, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): void; - update( - params: Params$Resource$Instances$Update, - callback: BodyResponseCallback): void; - update(callback: BodyResponseCallback): - void; - update( - paramsOrCallback?: Params$Resource$Instances$Update| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Instances$Update; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Update; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + - '/sql/v1beta3/projects/{project}/instances/{instance}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'PUT' - }, - options), - params, - requiredParams: ['project', 'instance'], - pathParams: ['instance', 'project'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Instances$Clone { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Project ID of the source as well as the clone Cloud SQL instance. - */ - project?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstancesCloneRequest; - } - export interface Params$Resource$Instances$Delete { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Cloud SQL instance ID. This does not include the project ID. - */ - instance?: string; - /** - * Project ID of the project that contains the instance to be deleted. - */ - project?: string; - } - export interface Params$Resource$Instances$Export { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Cloud SQL instance ID. This does not include the project ID. - */ - instance?: string; - /** - * Project ID of the project that contains the instance to be exported. - */ - project?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstancesExportRequest; - } - export interface Params$Resource$Instances$Get { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Database instance ID. This does not include the project ID. - */ - instance?: string; - /** - * Project ID of the project that contains the instance. - */ - project?: string; - } - export interface Params$Resource$Instances$Import { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Cloud SQL instance ID. This does not include the project ID. - */ - instance?: string; - /** - * Project ID of the project that contains the instance. - */ - project?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstancesImportRequest; - } - export interface Params$Resource$Instances$Insert { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Project ID of the project to which the newly created Cloud SQL instances - * should belong. - */ - project?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$DatabaseInstance; - } - export interface Params$Resource$Instances$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * The maximum number of results to return per response. - */ - maxResults?: number; - /** - * A previously-returned page token representing part of the larger set of - * results to view. - */ - pageToken?: string; - /** - * Project ID of the project for which to list Cloud SQL instances. - */ - project?: string; - } - export interface Params$Resource$Instances$Patch { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Cloud SQL instance ID. This does not include the project ID. - */ - instance?: string; - /** - * Project ID of the project that contains the instance. - */ - project?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$DatabaseInstance; - } - export interface Params$Resource$Instances$Promotereplica { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Cloud SQL read replica instance name. - */ - instance?: string; - /** - * ID of the project that contains the read replica. - */ - project?: string; - } - export interface Params$Resource$Instances$Resetsslconfig { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Cloud SQL instance ID. This does not include the project ID. - */ - instance?: string; - /** - * Project ID of the project that contains the instance. - */ - project?: string; - } - export interface Params$Resource$Instances$Restart { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Cloud SQL instance ID. This does not include the project ID. - */ - instance?: string; - /** - * Project ID of the project that contains the instance to be restarted. - */ - project?: string; - } - export interface Params$Resource$Instances$Restorebackup { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * The identifier of the backup configuration. This gets generated - * automatically when a backup configuration is created. - */ - backupConfiguration?: string; - /** - * The start time of the four-hour backup window. The backup can occur any - * time in the window. The time is in RFC 3339 format, for example - * 2012-11-15T16:19:00.094Z. - */ - dueTime?: string; - /** - * Cloud SQL instance ID. This does not include the project ID. - */ - instance?: string; - /** - * Project ID of the project that contains the instance. - */ - project?: string; - } - export interface Params$Resource$Instances$Setrootpassword { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Cloud SQL instance ID. This does not include the project ID. - */ - instance?: string; - /** - * Project ID of the project that contains the instance. - */ - project?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstanceSetRootPasswordRequest; - } - export interface Params$Resource$Instances$Update { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Cloud SQL instance ID. This does not include the project ID. - */ - instance?: string; - /** - * Project ID of the project that contains the instance. - */ - project?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$DatabaseInstance; - } - - - export class Resource$Operations { - root: Sqladmin; - constructor(root: Sqladmin) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * sql.operations.get - * @desc Retrieves information about a specific operation that was performed - * on a Cloud SQL instance. - * @alias sql.operations.get - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.instance Cloud SQL instance ID. This does not - * include the project ID. - * @param {string} params.operation Instance operation ID. - * @param {string} params.project Project ID of the project that contains - * the instance. - * @param {object} [options] Optionally override request options, such as - * `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - get(params?: Params$Resource$Operations$Get, - options?: MethodOptions): AxiosPromise; - get(params: Params$Resource$Operations$Get, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - get(params: Params$Resource$Operations$Get, - callback: BodyResponseCallback): void; - get(callback: BodyResponseCallback): void; - get(paramsOrCallback?: Params$Resource$Operations$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Operations$Get; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Operations$Get; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/sql/v1beta3/projects/{project}/instances/{instance}/operations/{operation}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['project', 'instance', 'operation'], - pathParams: ['instance', 'operation', 'project'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * sql.operations.list - * @desc Lists all operations that have been performed on a Cloud SQL - * instance. - * @alias sql.operations.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.instance Cloud SQL instance ID. This does not - * include the project ID. - * @param {integer=} params.maxResults Maximum number of operations per - * response. - * @param {string=} params.pageToken A previously-returned page token - * representing part of the larger set of results to view. - * @param {string} params.project Project ID of the project that contains - * the instance. - * @param {object} [options] Optionally override request options, such as - * `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list(params?: Params$Resource$Operations$List, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Operations$List, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Operations$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Operations$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Operations$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Operations$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/sql/v1beta3/projects/{project}/instances/{instance}/operations') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['project', 'instance'], - pathParams: ['instance', 'project'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Operations$Get { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Cloud SQL instance ID. This does not include the project ID. - */ - instance?: string; - /** - * Instance operation ID. - */ - operation?: string; - /** - * Project ID of the project that contains the instance. - */ - project?: string; - } - export interface Params$Resource$Operations$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Cloud SQL instance ID. This does not include the project ID. - */ - instance?: string; - /** - * Maximum number of operations per response. - */ - maxResults?: number; - /** - * A previously-returned page token representing part of the larger set of - * results to view. - */ - pageToken?: string; - /** - * Project ID of the project that contains the instance. - */ - project?: string; - } - - - export class Resource$Sslcerts { - root: Sqladmin; - constructor(root: Sqladmin) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * sql.sslCerts.delete - * @desc Deletes an SSL certificate from a Cloud SQL instance. - * @alias sql.sslCerts.delete - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.instance Cloud SQL instance ID. This does not - * include the project ID. - * @param {string} params.project Project ID of the project that contains - * the instance to be deleted. - * @param {string} params.sha1Fingerprint Sha1 FingerPrint. - * @param {object} [options] Optionally override request options, such as - * `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - delete(params?: Params$Resource$Sslcerts$Delete, options?: MethodOptions): - AxiosPromise; - delete( - params: Params$Resource$Sslcerts$Delete, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): void; - delete( - params: Params$Resource$Sslcerts$Delete, - callback: BodyResponseCallback): void; - delete(callback: BodyResponseCallback): void; - delete( - paramsOrCallback?: Params$Resource$Sslcerts$Delete| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Sslcerts$Delete; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Sslcerts$Delete; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/sql/v1beta3/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE' - }, - options), - params, - requiredParams: ['project', 'instance', 'sha1Fingerprint'], - pathParams: ['instance', 'project', 'sha1Fingerprint'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * sql.sslCerts.get - * @desc Retrieves an SSL certificate as specified by its SHA-1 fingerprint. - * @alias sql.sslCerts.get - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.instance Cloud SQL instance ID. This does not - * include the project ID. - * @param {string} params.project Project ID of the project that contains - * the instance. - * @param {string} params.sha1Fingerprint Sha1 FingerPrint. - * @param {object} [options] Optionally override request options, such as - * `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - get(params?: Params$Resource$Sslcerts$Get, - options?: MethodOptions): AxiosPromise; - get(params: Params$Resource$Sslcerts$Get, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - get(params: Params$Resource$Sslcerts$Get, - callback: BodyResponseCallback): void; - get(callback: BodyResponseCallback): void; - get(paramsOrCallback?: Params$Resource$Sslcerts$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions|BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Sslcerts$Get; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Sslcerts$Get; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/sql/v1beta3/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['project', 'instance', 'sha1Fingerprint'], - pathParams: ['instance', 'project', 'sha1Fingerprint'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * sql.sslCerts.insert - * @desc Creates an SSL certificate and returns the certificate, the - * associated private key, and the server certificate authority. - * @alias sql.sslCerts.insert - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.instance Cloud SQL instance ID. This does not - * include the project ID. - * @param {string} params.project Project ID of the project to which the - * newly created Cloud SQL instances should belong. - * @param {().SslCertsInsertRequest} params.resource Request body data - * @param {object} [options] Optionally override request options, such as - * `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - insert(params?: Params$Resource$Sslcerts$Insert, options?: MethodOptions): - AxiosPromise; - insert( - params: Params$Resource$Sslcerts$Insert, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): void; - insert( - params: Params$Resource$Sslcerts$Insert, - callback: BodyResponseCallback): void; - insert(callback: BodyResponseCallback): void; - insert( - paramsOrCallback?: Params$Resource$Sslcerts$Insert| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Sslcerts$Insert; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Sslcerts$Insert; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/sql/v1beta3/projects/{project}/instances/{instance}/sslCerts') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' - }, - options), - params, - requiredParams: ['project', 'instance'], - pathParams: ['instance', 'project'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - - /** - * sql.sslCerts.list - * @desc Lists all of the current SSL certificates defined for a Cloud SQL - * instance. - * @alias sql.sslCerts.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.instance Cloud SQL instance ID. This does not - * include the project ID. - * @param {string} params.project Project ID of the project for which to - * list Cloud SQL instances. - * @param {object} [options] Optionally override request options, such as - * `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list(params?: Params$Resource$Sslcerts$List, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Sslcerts$List, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Sslcerts$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Sslcerts$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Sslcerts$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Sslcerts$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: - (rootUrl + - '/sql/v1beta3/projects/{project}/instances/{instance}/sslCerts') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['project', 'instance'], - pathParams: ['instance', 'project'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Sslcerts$Delete { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Cloud SQL instance ID. This does not include the project ID. - */ - instance?: string; - /** - * Project ID of the project that contains the instance to be deleted. - */ - project?: string; - /** - * Sha1 FingerPrint. - */ - sha1Fingerprint?: string; - } - export interface Params$Resource$Sslcerts$Get { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Cloud SQL instance ID. This does not include the project ID. - */ - instance?: string; - /** - * Project ID of the project that contains the instance. - */ - project?: string; - /** - * Sha1 FingerPrint. - */ - sha1Fingerprint?: string; - } - export interface Params$Resource$Sslcerts$Insert { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Cloud SQL instance ID. This does not include the project ID. - */ - instance?: string; - /** - * Project ID of the project to which the newly created Cloud SQL instances - * should belong. - */ - project?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$SslCertsInsertRequest; - } - export interface Params$Resource$Sslcerts$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Cloud SQL instance ID. This does not include the project ID. - */ - instance?: string; - /** - * Project ID of the project for which to list Cloud SQL instances. - */ - project?: string; - } - - - export class Resource$Tiers { - root: Sqladmin; - constructor(root: Sqladmin) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } - - - /** - * sql.tiers.list - * @desc Lists service tiers that can be used to create Google Cloud SQL - * instances. - * @alias sql.tiers.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.project Project ID of the project for which to - * list tiers. - * @param {object} [options] Optionally override request options, such as - * `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - list(params?: Params$Resource$Tiers$List, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Tiers$List, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - list( - params: Params$Resource$Tiers$List, - callback: BodyResponseCallback): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: Params$Resource$Tiers$List| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Tiers$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Tiers$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/sql/v1beta3/projects/{project}/tiers') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' - }, - options), - params, - requiredParams: ['project'], - pathParams: ['project'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Tiers$List { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Project ID of the project for which to list tiers. - */ - project?: string; - } -} diff --git a/src/apis/sqladmin/v1beta4.ts b/src/apis/sqladmin/v1beta4.ts index cd3fdf432a6..e93f23f010f 100644 --- a/src/apis/sqladmin/v1beta4.ts +++ b/src/apis/sqladmin/v1beta4.ts @@ -32,8 +32,8 @@ export namespace sqladmin_v1beta4 { /** * Cloud SQL Admin API * - * Cloud SQL provides the Cloud SQL Admin API, a REST API for administering - * your instances programmatically. + * Creates and manages Cloud SQL instances, which provide fully managed MySQL + * or PostgreSQL databases. * * @example * const {google} = require('googleapis'); @@ -129,7 +129,7 @@ export namespace sqladmin_v1beta4 { startTime?: string; } /** - * A database instance backup run resource. + * A BackupRun resource. */ export interface Schema$BackupRun { /** @@ -152,8 +152,8 @@ export namespace sqladmin_v1beta4 { */ error?: Schema$OperationError; /** - * A unique identifier for this backup run. Note that this is unique only - * within the scope of a particular Cloud SQL instance. + * The identifier for this backup run. Unique only for a specific Cloud SQL + * instance. */ id?: string; /** @@ -248,7 +248,7 @@ export namespace sqladmin_v1beta4 { pitrTimestampMs?: string; } /** - * A database resource inside a Cloud SQL instance. + * Represents a SQL database on the Cloud SQL instance. */ export interface Schema$Database { /** @@ -260,7 +260,8 @@ export namespace sqladmin_v1beta4 { */ collation?: string; /** - * HTTP 1.1 Entity tag for the resource. + * This field is deprecated and will be removed from a future version of the + * API. */ etag?: string; /** @@ -287,16 +288,14 @@ export namespace sqladmin_v1beta4 { selfLink?: string; } /** - * MySQL flags for Cloud SQL instances. + * Database flags for Cloud SQL instances. */ export interface Schema$DatabaseFlags { /** * The name of the flag. These flags are passed at instance startup, so - * include both MySQL server options and MySQL system variables. Flags - * should be specified with underscores, not hyphens. For more information, - * see Configuring MySQL Flags in the Google Cloud SQL documentation, as - * well as the official MySQL documentation for server options and system - * variables. + * include both server options and system variables for MySQL. Flags should + * be specified with underscores, not hyphens. For more information, see + * Configuring Database Flags in the Cloud SQL documentation. */ name?: string; /** @@ -310,9 +309,11 @@ export namespace sqladmin_v1beta4 { */ export interface Schema$DatabaseInstance { /** - * FIRST_GEN: Basic Cloud SQL instance that runs in a Google-managed - * container. SECOND_GEN: A newer Cloud SQL backend that runs in a Compute - * Engine VM. EXTERNAL: A MySQL server that is not managed by Google. + * FIRST_GEN: First Generation instance. MySQL only. SECOND_GEN: Second + * Generation instance or PostgreSQL instance. EXTERNAL: A database server + * that is not managed by Google. This property is read-only; use the tier + * property in the settings object to determine the database type and Second + * or First Generation. */ backendType?: string; /** @@ -323,9 +324,7 @@ export namespace sqladmin_v1beta4 { * The current disk usage of the instance in bytes. This property has been * deprecated. Users should use the * "cloudsql.googleapis.com/database/disk/bytes_used" metric in - * Cloud Monitoring API instead. Please see - * https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ - * for details. + * Cloud Monitoring API instead. Please see this announcement for details. */ currentDiskSize?: string; /** @@ -336,7 +335,8 @@ export namespace sqladmin_v1beta4 { */ databaseVersion?: string; /** - * HTTP 1.1 Entity tag for the resource. + * This field is deprecated and will be removed from a future version of the + * API. Use the settings.settingsVersion field instead. */ etag?: string; /** @@ -402,8 +402,7 @@ export namespace sqladmin_v1beta4 { */ region?: string; /** - * Configuration specific to read-replicas replicating from on-premises - * masters. + * Configuration specific to failover replicas and read replicas. */ replicaConfiguration?: Schema$ReplicaConfiguration; /** @@ -589,7 +588,7 @@ export namespace sqladmin_v1beta4 { settingsVersion?: string; } /** - * A Google Cloud SQL service flag resource. + * A flag resource. */ export interface Schema$Flag { /** @@ -1143,8 +1142,8 @@ export namespace sqladmin_v1beta4 { */ activationPolicy?: string; /** - * The App Engine app IDs that can access this instance. This property is - * only applicable to First Generation instances. + * The App Engine app IDs that can access this instance. First Generation + * instances only. */ authorizedGaeApplications?: string[]; /** @@ -1175,13 +1174,13 @@ export namespace sqladmin_v1beta4 { */ databaseReplicationEnabled?: boolean; /** - * The size of data disk, in GB. The data disk size minimum is 10GB. Applies - * only to Second Generation instances. + * The size of data disk, in GB. The data disk size minimum is 10GB. Not + * used for First Generation instances. */ dataDiskSizeGb?: string; /** - * The type of data disk. Only supported for Second Generation instances. - * The default type is PD_SSD. Applies only to Second Generation instances. + * The type of data disk: PD_SSD (default) or PD_HDD. Not used for First + * Generation instances. */ dataDiskType?: string; /** @@ -1204,8 +1203,8 @@ export namespace sqladmin_v1beta4 { locationPreference?: Schema$LocationPreference; /** * The maintenance window for this instance. This specifies when the - * instance may be restarted for maintenance purposes. Applies only to - * Second Generation instances. + * instance can be restarted for maintenance purposes. Not used for First + * Generation instances. */ maintenanceWindow?: Schema$MaintenanceWindow; /** @@ -1228,18 +1227,21 @@ export namespace sqladmin_v1beta4 { settingsVersion?: string; /** * Configuration to increase storage size automatically. The default value - * is true. Applies only to Second Generation instances. + * is true. Not used for First Generation instances. */ storageAutoResize?: boolean; /** * The maximum size to which storage capacity can be automatically * increased. The default value is 0, which specifies that there is no - * limit. Applies only to Second Generation instances. + * limit. Not used for First Generation instances. */ storageAutoResizeLimit?: string; /** - * The tier of service for this instance, for example D1, D2. For more - * information, see pricing. + * The tier (or machine type) for this instance, for example + * db-n1-standard-1 (MySQL instances) or db-custom-1-3840 (PostgreSQL + * instances). For MySQL instances, this property determines whether the + * instance is First or Second Generation. For more information, see + * Instance Settings. */ tier?: string; /** @@ -1420,7 +1422,8 @@ export namespace sqladmin_v1beta4 { */ export interface Schema$User { /** - * HTTP 1.1 Entity tag for the resource. + * This field is deprecated and will be removed from a future version of the + * API. */ etag?: string; /** @@ -1441,7 +1444,7 @@ export namespace sqladmin_v1beta4 { kind?: string; /** * The name of the user in the Cloud SQL instance. Can be omitted for update - * since it is already specified on the URL. + * since it is already specified in the URL. */ name?: string; /** @@ -1698,7 +1701,8 @@ export namespace sqladmin_v1beta4 { /** * sql.backupRuns.list * @desc Lists all backup runs associated with a given instance and - * configuration in the reverse chronological order of the enqueued time. + * configuration in the reverse chronological order of the backup initiation + * time. * @alias sql.backupRuns.list * @memberOf! () * @@ -2422,7 +2426,7 @@ export namespace sqladmin_v1beta4 { * @memberOf! () * * @param {object=} params Parameters for request - * @param {string=} params.databaseVersion Database version for flag retrieval. Flags are specific to the database version. + * @param {string=} params.databaseVersion Database type and version you want to retrieve flags for. By default, this method returns flags for all database types and versions. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -2487,8 +2491,8 @@ export namespace sqladmin_v1beta4 { auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Database version for flag retrieval. Flags are specific to the database - * version. + * Database type and version you want to retrieve flags for. By default, + * this method returns flags for all database types and versions. */ databaseVersion?: string; } @@ -5300,7 +5304,7 @@ import(paramsOrCallback?: Params$Resource$Instances$Import|BodyResponseCallback< * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.host Host of the user in the instance. + * @param {string=} params.host Host of the user in the instance. * @param {string} params.instance Database instance ID. This does not include the project ID. * @param {string} params.name Name of the user in the instance. * @param {string} params.project Project ID of the project that contains the instance. @@ -5352,7 +5356,7 @@ import(paramsOrCallback?: Params$Resource$Instances$Import|BodyResponseCallback< }, options), params, - requiredParams: ['project', 'instance', 'host', 'name'], + requiredParams: ['project', 'instance', 'name'], pathParams: ['instance', 'project'], context: this.getRoot() }; diff --git a/src/apis/storage/v1.ts b/src/apis/storage/v1.ts index 8409983abbf..60b5ae35234 100644 --- a/src/apis/storage/v1.ts +++ b/src/apis/storage/v1.ts @@ -5948,7 +5948,7 @@ export namespace storage_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.destinationBucket Name of the bucket in which to store the new object. + * @param {string} params.destinationBucket Name of the bucket containing the source objects. The destination object is stored in this bucket. * @param {string} params.destinationObject Name of the new object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. * @param {string=} params.destinationPredefinedAcl Apply a predefined set of access controls to the destination object. * @param {string=} params.ifGenerationMatch Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. @@ -7706,7 +7706,8 @@ export namespace storage_v1 { auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Name of the bucket in which to store the new object. + * Name of the bucket containing the source objects. The destination object + * is stored in this bucket. */ destinationBucket?: string; /** diff --git a/src/apis/storage/v1beta2.ts b/src/apis/storage/v1beta2.ts index 0618ee0f8db..0fa4fb0b1e8 100644 --- a/src/apis/storage/v1beta2.ts +++ b/src/apis/storage/v1beta2.ts @@ -2839,7 +2839,7 @@ export namespace storage_v1beta2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.destinationBucket Name of the bucket in which to store the new object. + * @param {string} params.destinationBucket Name of the bucket containing the source objects. The destination object is stored in this bucket. * @param {string} params.destinationObject Name of the new object. * @param {string=} params.ifGenerationMatch Makes the operation conditional on whether the object's current generation matches the given value. * @param {string=} params.ifMetagenerationMatch Makes the operation conditional on whether the object's current metageneration matches the given value. @@ -3498,7 +3498,8 @@ export namespace storage_v1beta2 { auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Name of the bucket in which to store the new object. + * Name of the bucket containing the source objects. The destination object + * is stored in this bucket. */ destinationBucket?: string; /** diff --git a/src/apis/storagetransfer/v1.ts b/src/apis/storagetransfer/v1.ts index 8b40f2c7e51..844654ffc5e 100644 --- a/src/apis/storagetransfer/v1.ts +++ b/src/apis/storagetransfer/v1.ts @@ -103,23 +103,25 @@ export namespace storagetransfer_v1 { bucketName?: string; } /** - * Represents a whole calendar date, e.g. date of birth. The time of day and - * time zone are either specified elsewhere or are not significant. The date - * is relative to the Proleptic Gregorian Calendar. The day may be 0 to - * represent a year and month where the day is not significant, e.g. credit - * card expiration date. The year may be 0 to represent a month and day - * independent of year, e.g. anniversary date. Related types are + * Represents a whole or partial calendar date, e.g. a birthday. The time of + * day and time zone are either specified elsewhere or are not significant. + * The date is relative to the Proleptic Gregorian Calendar. This can + * represent: * A full date, with non-zero year, month and day values * A + * month and day value, with a zero year, e.g. an anniversary * A year on its + * own, with zero month and day values * A year and month value, with a zero + * day, e.g. a credit card expiration date Related types are * google.type.TimeOfDay and `google.protobuf.Timestamp`. */ export interface Schema$Date { /** * Day of month. Must be from 1 to 31 and valid for the year and month, or 0 - * if specifying a year/month where the day is not significant. + * if specifying a year by itself or a year and month where the day is not + * significant. */ day?: number; /** - * Month of year. Must be from 1 to 12, or 0 if specifying a date without a - * month. + * Month of year. Must be from 1 to 12, or 0 if specifying a year without a + * month and day. */ month?: number; /** diff --git a/src/apis/streetviewpublish/v1.ts b/src/apis/streetviewpublish/v1.ts index dd659d115ef..a25825182dc 100644 --- a/src/apis/streetviewpublish/v1.ts +++ b/src/apis/streetviewpublish/v1.ts @@ -313,6 +313,12 @@ export namespace streetviewpublish_v1 { * Raw pose measurement for an entity. */ export interface Schema$Pose { + /** + * The estimated horizontal accuracy of this pose in meters with 68% (one + * standard deviation) confidence. For more information, see: + * https://developer.android.com/reference/android/location/Location#getAccuracy() + */ + accuracyMeters?: number; /** * Altitude of the pose in meters above WGS84 ellipsoid. NaN indicates an * unmeasured quantity. diff --git a/src/apis/testing/v1.ts b/src/apis/testing/v1.ts index 8b524f91696..8c70ee04afd 100644 --- a/src/apis/testing/v1.ts +++ b/src/apis/testing/v1.ts @@ -233,7 +233,7 @@ export namespace testing_v1 { */ form?: string; /** - * Whther this device is a phone, tablet, wearable, etc. @OutputOnly + * Whether this device is a phone, tablet, wearable, etc. @OutputOnly */ formFactor?: string; /** @@ -501,23 +501,25 @@ export namespace testing_v1 { value?: string; } /** - * Represents a whole calendar date, e.g. date of birth. The time of day and - * time zone are either specified elsewhere or are not significant. The date - * is relative to the Proleptic Gregorian Calendar. The day may be 0 to - * represent a year and month where the day is not significant, e.g. credit - * card expiration date. The year may be 0 to represent a month and day - * independent of year, e.g. anniversary date. Related types are + * Represents a whole or partial calendar date, e.g. a birthday. The time of + * day and time zone are either specified elsewhere or are not significant. + * The date is relative to the Proleptic Gregorian Calendar. This can + * represent: * A full date, with non-zero year, month and day values * A + * month and day value, with a zero year, e.g. an anniversary * A year on its + * own, with zero month and day values * A year and month value, with a zero + * day, e.g. a credit card expiration date Related types are * google.type.TimeOfDay and `google.protobuf.Timestamp`. */ export interface Schema$Date { /** * Day of month. Must be from 1 to 31 and valid for the year and month, or 0 - * if specifying a year/month where the day is not significant. + * if specifying a year by itself or a year and month where the day is not + * significant. */ day?: number; /** - * Month of year. Must be from 1 to 12, or 0 if specifying a date without a - * month. + * Month of year. Must be from 1 to 12, or 0 if specifying a year without a + * month and day. */ month?: number; /** @@ -562,6 +564,10 @@ export namespace testing_v1 { * An Android device which must be used with an Android test. */ androidDevice?: Schema$AndroidDevice; + /** + * An iOS device which must be used with an iOS test. + */ + iosDevice?: Schema$IosDevice; } /** * The matrix of environments in which the test is to be executed. @@ -576,6 +582,10 @@ export namespace testing_v1 { * A matrix of Android devices. */ androidMatrix?: Schema$AndroidMatrix; + /** + * A list of iOS devices. + */ + iosDeviceList?: Schema$IosDeviceList; } /** * A key-value pair passed as an environment variable to the test @@ -647,6 +657,163 @@ export namespace testing_v1 { */ mimeType?: string; } + /** + * A single iOS device. + */ + export interface Schema$IosDevice { + /** + * Required. The id of the iOS device to be used. Use the + * EnvironmentDiscoveryService to get supported options. + */ + iosModelId?: string; + /** + * Required. The id of the iOS major software version to be used. Use the + * EnvironmentDiscoveryService to get supported options. + */ + iosVersionId?: string; + /** + * Required. The locale the test device used for testing. Use the + * EnvironmentDiscoveryService to get supported options. + */ + locale?: string; + /** + * Required. How the device is oriented during the test. Use the + * EnvironmentDiscoveryService to get supported options. + */ + orientation?: string; + } + /** + * The currently supported iOS devices. + */ + export interface Schema$IosDeviceCatalog { + /** + * Output only. The set of supported iOS device models. + */ + models?: Schema$IosModel[]; + /** + * Output only. The set of supported runtime configurations. + */ + runtimeConfiguration?: Schema$IosRuntimeConfiguration; + /** + * Output only. The set of supported iOS software versions. + */ + versions?: Schema$IosVersion[]; + } + /** + * A list of iOS device configurations in which the test is to be executed. + */ + export interface Schema$IosDeviceList { + /** + * Required. A list of iOS devices + */ + iosDevices?: Schema$IosDevice[]; + } + /** + * A description of an iOS device tests may be run on. + */ + export interface Schema$IosModel { + /** + * Output only. Device capabilities. Copied from + * https://developer.apple.com/library/archive/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/DeviceCompatibilityMatrix/DeviceCompatibilityMatrix.html + */ + deviceCapabilities?: string[]; + /** + * Whether this device is a phone, tablet, wearable, etc. @OutputOnly + */ + formFactor?: string; + /** + * Output only. The unique opaque id for this model. Use this for invoking + * the TestExecutionService. + */ + id?: string; + /** + * Output only. The human-readable name for this device model. Examples: + * "iPhone 4s", "iPad Mini 2" + */ + name?: string; + /** + * Output only. The set of iOS major software versions this device supports. + */ + supportedVersionIds?: string[]; + /** + * Output only. Tags for this dimension. Examples: "default", + * "preview", "deprecated" + */ + tags?: string[]; + } + /** + * iOS configuration that can be selected at the time a test is run. + */ + export interface Schema$IosRuntimeConfiguration { + /** + * Output only. The set of available locales. + */ + locales?: Schema$Locale[]; + /** + * Output only. The set of available orientations. + */ + orientations?: Schema$Orientation[]; + } + /** + * A description of how to set up an iOS device prior to a test. + */ + export interface Schema$IosTestSetup { + /** + * Optional. The network traffic profile used for running the test. + * Available network profiles can be queried by using the + * NETWORK_CONFIGURATION environment type when calling + * TestEnvironmentDiscoveryService.GetTestEnvironmentCatalog. + */ + networkProfile?: string; + } + /** + * An iOS version + */ + export interface Schema$IosVersion { + /** + * Output only. An opaque id for this iOS version. Use this id to invoke the + * TestExecutionService. + */ + id?: string; + /** + * Output only. An integer representing the major iOS version. Examples: + * "8", "9" + */ + majorVersion?: number; + /** + * Output only. An integer representing the minor iOS version. Examples: + * "1", "2" + */ + minorVersion?: number; + /** + * Output only. Tags for this dimension. Examples: "default", + * "preview", "deprecated" + */ + tags?: string[]; + } + /** + * A test of an iOS application that uses the XCTest framework. Xcode supports + * the option to "build for testing", which generates an .xctestrun + * file that contains a test specification (arguments, test methods, etc). + * This test type accepts a zip file containing the .xctestrun file and the + * corresponding contents of the Build/Products directory that contains all + * the binaries needed to run the tests. + */ + export interface Schema$IosXcTest { + /** + * Required. The .zip containing the .xctestrun file and the contents of the + * DerivedData/Build/Products directory. The .xctestrun file in this zip is + * ignored if the xctestrun field is specified. + */ + testsZip?: Schema$FileReference; + /** + * Optional. An .xctestrun file that will override the .xctestrun file in + * the tests zip. Because the .xctestrun file contains environment variables + * along with test methods to run and/or ignore, this can be useful for + * sharding tests. Default is taken from the tests zip. + */ + xctestrun?: Schema$FileReference; + } /** * Specifies an intent that starts the main launcher activity. */ @@ -859,6 +1026,10 @@ export namespace testing_v1 { * Android devices suitable for running Android Instrumentation Tests. */ androidDeviceCatalog?: Schema$AndroidDeviceCatalog; + /** + * Supported iOS devices + */ + iosDeviceCatalog?: Schema$IosDeviceCatalog; /** * Supported network configurations */ @@ -1034,6 +1205,14 @@ export namespace testing_v1 { * Disables video recording; may reduce test latency. */ disableVideoRecording?: boolean; + /** + * Optional. Test setup requirements for iOS. + */ + iosTestSetup?: Schema$IosTestSetup; + /** + * An iOS XCTest, via an .xctestrun file + */ + iosXcTest?: Schema$IosXcTest; /** * Test setup requirements for Android e.g. files to install, bootstrap * scripts. Optional diff --git a/src/apis/toolresults/v1beta3.ts b/src/apis/toolresults/v1beta3.ts index 86e78c73c20..a4d9c369382 100644 --- a/src/apis/toolresults/v1beta3.ts +++ b/src/apis/toolresults/v1beta3.ts @@ -1266,7 +1266,7 @@ export namespace toolresults_v1beta3 { * "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on * January 15, 2017. In JavaScript, one can convert a Date object to this * format using the standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] + * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) * method. In Python, a standard `datetime.datetime` object can be converted * to this format using * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) diff --git a/src/apis/videointelligence/index.ts b/src/apis/videointelligence/index.ts index 42ab89ed348..30675b39440 100644 --- a/src/apis/videointelligence/index.ts +++ b/src/apis/videointelligence/index.ts @@ -16,10 +16,12 @@ import {getAPI, GoogleConfigurable} from 'googleapis-common'; import {videointelligence_v1} from './v1'; import {videointelligence_v1beta2} from './v1beta2'; +import {videointelligence_v1p1beta1} from './v1p1beta1'; export const VERSIONS = { 'v1': videointelligence_v1.Videointelligence, 'v1beta2': videointelligence_v1beta2.Videointelligence, + 'v1p1beta1': videointelligence_v1p1beta1.Videointelligence, }; export function videointelligence(version: 'v1'): @@ -30,11 +32,18 @@ export function videointelligence(version: 'v1beta2'): videointelligence_v1beta2.Videointelligence; export function videointelligence(options: videointelligence_v1beta2.Options): videointelligence_v1beta2.Videointelligence; +export function videointelligence(version: 'v1p1beta1'): + videointelligence_v1p1beta1.Videointelligence; +export function videointelligence(options: videointelligence_v1p1beta1.Options): + videointelligence_v1p1beta1.Videointelligence; export function videointelligence< T = videointelligence_v1.Videointelligence | - videointelligence_v1beta2.Videointelligence>( + videointelligence_v1beta2.Videointelligence | + videointelligence_v1p1beta1.Videointelligence>( this: GoogleConfigurable, versionOrOptions: 'v1'| - videointelligence_v1.Options|'v1beta2'|videointelligence_v1beta2.Options) { + videointelligence_v1.Options|'v1beta2'| + videointelligence_v1beta2.Options|'v1p1beta1'| + videointelligence_v1p1beta1.Options) { return getAPI('videointelligence', versionOrOptions, VERSIONS, this); } diff --git a/src/apis/videointelligence/v1p1beta1.ts b/src/apis/videointelligence/v1p1beta1.ts new file mode 100644 index 00000000000..69f755797f4 --- /dev/null +++ b/src/apis/videointelligence/v1p1beta1.ts @@ -0,0 +1,1107 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {AxiosPromise} from 'axios'; +import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; +import {BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace videointelligence_v1p1beta1 { + export interface Options extends GlobalOptions { + version: 'v1p1beta1'; + } + + /** + * Cloud Video Intelligence API + * + * Cloud Video Intelligence API. + * + * @example + * const {google} = require('googleapis'); + * const videointelligence = google.videointelligence('v1p1beta1'); + * + * @namespace videointelligence + * @type {Function} + * @version v1p1beta1 + * @variation v1p1beta1 + * @param {object=} options Options for Videointelligence + */ + export class Videointelligence { + _options: GlobalOptions; + google?: GoogleConfigurable; + root = this; + + videos: Resource$Videos; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this._options = options || {}; + this.google = google; + this.getRoot.bind(this); + + this.videos = new Resource$Videos(this); + } + + getRoot() { + return this.root; + } + } + + /** + * Video annotation progress. Included in the `metadata` field of the + * `Operation` returned by the `GetOperation` call of the + * `google::longrunning::Operations` service. + */ + export interface Schema$GoogleCloudVideointelligenceV1beta2_AnnotateVideoProgress { + /** + * Progress metadata for all videos specified in `AnnotateVideoRequest`. + */ + annotationProgress?: + Schema$GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress[]; + } + /** + * Video annotation response. Included in the `response` field of the + * `Operation` returned by the `GetOperation` call of the + * `google::longrunning::Operations` service. + */ + export interface Schema$GoogleCloudVideointelligenceV1beta2_AnnotateVideoResponse { + /** + * Annotation results for all videos specified in `AnnotateVideoRequest`. + */ + annotationResults?: + Schema$GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults[]; + } + /** + * Detected entity from video analysis. + */ + export interface Schema$GoogleCloudVideointelligenceV1beta2_Entity { + /** + * Textual description, e.g. `Fixed-gear bicycle`. + */ + description?: string; + /** + * Opaque entity ID. Some IDs may be available in [Google Knowledge Graph + * Search API](https://developers.google.com/knowledge-graph/). + */ + entityId?: string; + /** + * Language code for `description` in BCP-47 format. + */ + languageCode?: string; + } + /** + * Explicit content annotation (based on per-frame visual signals only). If no + * explicit content has been detected in a frame, no annotations are present + * for that frame. + */ + export interface Schema$GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation { + /** + * All video frames where explicit content was detected. + */ + frames?: Schema$GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame[]; + } + /** + * Video frame level annotation results for explicit content. + */ + export interface Schema$GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame { + /** + * Likelihood of the pornography content.. + */ + pornographyLikelihood?: string; + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * video frame for this location. + */ + timeOffset?: string; + } + /** + * Label annotation. + */ + export interface Schema$GoogleCloudVideointelligenceV1beta2_LabelAnnotation { + /** + * Common categories for the detected entity. E.g. when the label is + * `Terrier` the category is likely `dog`. And in some cases there might be + * more than one categories e.g. `Terrier` could also be a `pet`. + */ + categoryEntities?: Schema$GoogleCloudVideointelligenceV1beta2_Entity[]; + /** + * Detected entity. + */ + entity?: Schema$GoogleCloudVideointelligenceV1beta2_Entity; + /** + * All video frames where a label was detected. + */ + frames?: Schema$GoogleCloudVideointelligenceV1beta2_LabelFrame[]; + /** + * All video segments where a label was detected. + */ + segments?: Schema$GoogleCloudVideointelligenceV1beta2_LabelSegment[]; + } + /** + * Video frame level annotation results for label detection. + */ + export interface Schema$GoogleCloudVideointelligenceV1beta2_LabelFrame { + /** + * Confidence that the label is accurate. Range: [0, 1]. + */ + confidence?: number; + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * video frame for this location. + */ + timeOffset?: string; + } + /** + * Video segment level annotation results for label detection. + */ + export interface Schema$GoogleCloudVideointelligenceV1beta2_LabelSegment { + /** + * Confidence that the label is accurate. Range: [0, 1]. + */ + confidence?: number; + /** + * Video segment where a label was detected. + */ + segment?: Schema$GoogleCloudVideointelligenceV1beta2_VideoSegment; + } + /** + * Annotation progress for a single video. + */ + export interface Schema$GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress { + /** + * Video file location in [Google Cloud + * Storage](https://cloud.google.com/storage/). + */ + inputUri?: string; + /** + * Approximate percentage processed thus far. Guaranteed to be 100 when + * fully processed. + */ + progressPercent?: number; + /** + * Time when the request was received. + */ + startTime?: string; + /** + * Time of the most recent update. + */ + updateTime?: string; + } + /** + * Annotation results for a single video. + */ + export interface Schema$GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults { + /** + * If set, indicates an error. Note that for a single `AnnotateVideoRequest` + * some videos may succeed and some may fail. + */ + error?: Schema$GoogleRpc_Status; + /** + * Explicit content annotation. + */ + explicitAnnotation?: + Schema$GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation; + /** + * Label annotations on frame level. There is exactly one element for each + * unique label. + */ + frameLabelAnnotations?: + Schema$GoogleCloudVideointelligenceV1beta2_LabelAnnotation[]; + /** + * Video file location in [Google Cloud + * Storage](https://cloud.google.com/storage/). + */ + inputUri?: string; + /** + * Label annotations on video level or user specified segment level. There + * is exactly one element for each unique label. + */ + segmentLabelAnnotations?: + Schema$GoogleCloudVideointelligenceV1beta2_LabelAnnotation[]; + /** + * Shot annotations. Each shot is represented as a video segment. + */ + shotAnnotations?: Schema$GoogleCloudVideointelligenceV1beta2_VideoSegment[]; + /** + * Label annotations on shot level. There is exactly one element for each + * unique label. + */ + shotLabelAnnotations?: + Schema$GoogleCloudVideointelligenceV1beta2_LabelAnnotation[]; + } + /** + * Video segment. + */ + export interface Schema$GoogleCloudVideointelligenceV1beta2_VideoSegment { + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * end of the segment (inclusive). + */ + endTimeOffset?: string; + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * start of the segment (inclusive). + */ + startTimeOffset?: string; + } + /** + * Video annotation progress. Included in the `metadata` field of the + * `Operation` returned by the `GetOperation` call of the + * `google::longrunning::Operations` service. + */ + export interface Schema$GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoProgress { + /** + * Progress metadata for all videos specified in `AnnotateVideoRequest`. + */ + annotationProgress?: + Schema$GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationProgress[]; + } + /** + * Video annotation request. + */ + export interface Schema$GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoRequest { + /** + * Requested video annotation features. + */ + features?: string[]; + /** + * The video data bytes. If unset, the input video(s) should be specified + * via `input_uri`. If set, `input_uri` should be unset. + */ + inputContent?: string; + /** + * Input video location. Currently, only [Google Cloud + * Storage](https://cloud.google.com/storage/) URIs are supported, which + * must be specified in the following format: `gs://bucket-id/object-id` + * (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more + * information, see [Request URIs](/storage/docs/reference-uris). A video + * URI may include wildcards in `object-id`, and thus identify multiple + * videos. Supported wildcards: '*' to match 0 or more characters; + * '?' to match 1 character. If unset, the input video should be + * embedded in the request as `input_content`. If set, `input_content` + * should be unset. + */ + inputUri?: string; + /** + * Optional cloud region where annotation should take place. Supported cloud + * regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no + * region is specified, a region will be determined based on video file + * location. + */ + locationId?: string; + /** + * Optional location where the output (in JSON format) should be stored. + * Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) + * URIs are supported, which must be specified in the following format: + * `gs://bucket-id/object-id` (other URI formats return + * google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request + * URIs](/storage/docs/reference-uris). + */ + outputUri?: string; + /** + * Additional video context and/or feature-specific parameters. + */ + videoContext?: Schema$GoogleCloudVideointelligenceV1p1beta1_VideoContext; + } + /** + * Video annotation response. Included in the `response` field of the + * `Operation` returned by the `GetOperation` call of the + * `google::longrunning::Operations` service. + */ + export interface Schema$GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoResponse { + /** + * Annotation results for all videos specified in `AnnotateVideoRequest`. + */ + annotationResults?: + Schema$GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationResults[]; + } + /** + * Detected entity from video analysis. + */ + export interface Schema$GoogleCloudVideointelligenceV1p1beta1_Entity { + /** + * Textual description, e.g. `Fixed-gear bicycle`. + */ + description?: string; + /** + * Opaque entity ID. Some IDs may be available in [Google Knowledge Graph + * Search API](https://developers.google.com/knowledge-graph/). + */ + entityId?: string; + /** + * Language code for `description` in BCP-47 format. + */ + languageCode?: string; + } + /** + * Explicit content annotation (based on per-frame visual signals only). If no + * explicit content has been detected in a frame, no annotations are present + * for that frame. + */ + export interface Schema$GoogleCloudVideointelligenceV1p1beta1_ExplicitContentAnnotation { + /** + * All video frames where explicit content was detected. + */ + frames?: + Schema$GoogleCloudVideointelligenceV1p1beta1_ExplicitContentFrame[]; + } + /** + * Config for EXPLICIT_CONTENT_DETECTION. + */ + export interface Schema$GoogleCloudVideointelligenceV1p1beta1_ExplicitContentDetectionConfig { + /** + * Model to use for explicit content detection. Supported values: + * "builtin/stable" (the default if unset) and + * "builtin/latest". + */ + model?: string; + } + /** + * Video frame level annotation results for explicit content. + */ + export interface Schema$GoogleCloudVideointelligenceV1p1beta1_ExplicitContentFrame { + /** + * Likelihood of the pornography content.. + */ + pornographyLikelihood?: string; + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * video frame for this location. + */ + timeOffset?: string; + } + /** + * Label annotation. + */ + export interface Schema$GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation { + /** + * Common categories for the detected entity. E.g. when the label is + * `Terrier` the category is likely `dog`. And in some cases there might be + * more than one categories e.g. `Terrier` could also be a `pet`. + */ + categoryEntities?: Schema$GoogleCloudVideointelligenceV1p1beta1_Entity[]; + /** + * Detected entity. + */ + entity?: Schema$GoogleCloudVideointelligenceV1p1beta1_Entity; + /** + * All video frames where a label was detected. + */ + frames?: Schema$GoogleCloudVideointelligenceV1p1beta1_LabelFrame[]; + /** + * All video segments where a label was detected. + */ + segments?: Schema$GoogleCloudVideointelligenceV1p1beta1_LabelSegment[]; + } + /** + * Config for LABEL_DETECTION. + */ + export interface Schema$GoogleCloudVideointelligenceV1p1beta1_LabelDetectionConfig { + /** + * What labels should be detected with LABEL_DETECTION, in addition to + * video-level labels or segment-level labels. If unspecified, defaults to + * `SHOT_MODE`. + */ + labelDetectionMode?: string; + /** + * Model to use for label detection. Supported values: + * "builtin/stable" (the default if unset) and + * "builtin/latest". + */ + model?: string; + /** + * Whether the video has been shot from a stationary (i.e. non-moving) + * camera. When set to true, might improve detection accuracy for moving + * objects. Should be used with `SHOT_AND_FRAME_MODE` enabled. + */ + stationaryCamera?: boolean; + } + /** + * Video frame level annotation results for label detection. + */ + export interface Schema$GoogleCloudVideointelligenceV1p1beta1_LabelFrame { + /** + * Confidence that the label is accurate. Range: [0, 1]. + */ + confidence?: number; + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * video frame for this location. + */ + timeOffset?: string; + } + /** + * Video segment level annotation results for label detection. + */ + export interface Schema$GoogleCloudVideointelligenceV1p1beta1_LabelSegment { + /** + * Confidence that the label is accurate. Range: [0, 1]. + */ + confidence?: number; + /** + * Video segment where a label was detected. + */ + segment?: Schema$GoogleCloudVideointelligenceV1p1beta1_VideoSegment; + } + /** + * Config for SHOT_CHANGE_DETECTION. + */ + export interface Schema$GoogleCloudVideointelligenceV1p1beta1_ShotChangeDetectionConfig { + /** + * Model to use for shot change detection. Supported values: + * "builtin/stable" (the default if unset) and + * "builtin/latest". + */ + model?: string; + } + /** + * Provides "hints" to the speech recognizer to favor specific words + * and phrases in the results. + */ + export interface Schema$GoogleCloudVideointelligenceV1p1beta1_SpeechContext { + /** + * *Optional* A list of strings containing words and phrases + * "hints" so that the speech recognition is more likely to + * recognize them. This can be used to improve the accuracy for specific + * words and phrases, for example, if specific commands are typically spoken + * by the user. This can also be used to add additional words to the + * vocabulary of the recognizer. See [usage + * limits](https://cloud.google.com/speech/limits#content). + */ + phrases?: string[]; + } + /** + * Alternative hypotheses (a.k.a. n-best list). + */ + export interface Schema$GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative { + /** + * The confidence estimate between 0.0 and 1.0. A higher number indicates an + * estimated greater likelihood that the recognized words are correct. This + * field is typically provided only for the top hypothesis, and only for + * `is_final=true` results. Clients should not rely on the `confidence` + * field as it is not guaranteed to be accurate or consistent. The default + * of 0.0 is a sentinel value indicating `confidence` was not set. + */ + confidence?: number; + /** + * Transcript text representing the words that the user spoke. + */ + transcript?: string; + /** + * A list of word-specific information for each recognized word. + */ + words?: Schema$GoogleCloudVideointelligenceV1p1beta1_WordInfo[]; + } + /** + * A speech recognition result corresponding to a portion of the audio. + */ + export interface Schema$GoogleCloudVideointelligenceV1p1beta1_SpeechTranscription { + /** + * May contain one or more recognition hypotheses (up to the maximum + * specified in `max_alternatives`). These alternatives are ordered in + * terms of accuracy, with the top (first) alternative being the most + * probable, as ranked by the recognizer. + */ + alternatives?: + Schema$GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative[]; + } + /** + * Config for SPEECH_TRANSCRIPTION. + */ + export interface Schema$GoogleCloudVideointelligenceV1p1beta1_SpeechTranscriptionConfig { + /** + * *Optional* For file formats, such as MXF or MKV, supporting multiple + * audio tracks, specify up to two tracks. Default: track 0. + */ + audioTracks?: number[]; + /** + * *Optional* If 'true', adds punctuation to recognition result + * hypotheses. This feature is only available in select languages. Setting + * this for requests in other languages has no effect at all. The default + * 'false' value does not add punctuation to result hypotheses. + * NOTE: "This is currently offered as an experimental service, + * complimentary to all users. In the future this may be exclusively + * available as a premium feature." + */ + enableAutomaticPunctuation?: boolean; + /** + * *Optional* If set to `true`, the server will attempt to filter out + * profanities, replacing all but the initial character in each filtered + * word with asterisks, e.g. "f***". If set to `false` or omitted, + * profanities won't be filtered out. + */ + filterProfanity?: boolean; + /** + * *Required* The language of the supplied audio as a + * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + * Example: "en-US". See [Language + * Support](https://cloud.google.com/speech/docs/languages) for a list of + * the currently supported language codes. + */ + languageCode?: string; + /** + * *Optional* Maximum number of recognition hypotheses to be returned. + * Specifically, the maximum number of `SpeechRecognitionAlternative` + * messages within each `SpeechRecognitionResult`. The server may return + * fewer than `max_alternatives`. Valid values are `0`-`30`. A value of `0` + * or `1` will return a maximum of one. If omitted, will return a maximum of + * one. + */ + maxAlternatives?: number; + /** + * *Optional* A means to provide context to assist the speech recognition. + */ + speechContexts?: + Schema$GoogleCloudVideointelligenceV1p1beta1_SpeechContext[]; + } + /** + * Annotation progress for a single video. + */ + export interface Schema$GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationProgress { + /** + * Video file location in [Google Cloud + * Storage](https://cloud.google.com/storage/). + */ + inputUri?: string; + /** + * Approximate percentage processed thus far. Guaranteed to be 100 when + * fully processed. + */ + progressPercent?: number; + /** + * Time when the request was received. + */ + startTime?: string; + /** + * Time of the most recent update. + */ + updateTime?: string; + } + /** + * Annotation results for a single video. + */ + export interface Schema$GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationResults { + /** + * If set, indicates an error. Note that for a single `AnnotateVideoRequest` + * some videos may succeed and some may fail. + */ + error?: Schema$GoogleRpc_Status; + /** + * Explicit content annotation. + */ + explicitAnnotation?: + Schema$GoogleCloudVideointelligenceV1p1beta1_ExplicitContentAnnotation; + /** + * Label annotations on frame level. There is exactly one element for each + * unique label. + */ + frameLabelAnnotations?: + Schema$GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation[]; + /** + * Video file location in [Google Cloud + * Storage](https://cloud.google.com/storage/). + */ + inputUri?: string; + /** + * Label annotations on video level or user specified segment level. There + * is exactly one element for each unique label. + */ + segmentLabelAnnotations?: + Schema$GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation[]; + /** + * Shot annotations. Each shot is represented as a video segment. + */ + shotAnnotations?: + Schema$GoogleCloudVideointelligenceV1p1beta1_VideoSegment[]; + /** + * Label annotations on shot level. There is exactly one element for each + * unique label. + */ + shotLabelAnnotations?: + Schema$GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation[]; + /** + * Speech transcription. + */ + speechTranscriptions?: + Schema$GoogleCloudVideointelligenceV1p1beta1_SpeechTranscription[]; + } + /** + * Video context and/or feature-specific parameters. + */ + export interface Schema$GoogleCloudVideointelligenceV1p1beta1_VideoContext { + /** + * Config for EXPLICIT_CONTENT_DETECTION. + */ + explicitContentDetectionConfig?: + Schema$GoogleCloudVideointelligenceV1p1beta1_ExplicitContentDetectionConfig; + /** + * Config for LABEL_DETECTION. + */ + labelDetectionConfig?: + Schema$GoogleCloudVideointelligenceV1p1beta1_LabelDetectionConfig; + /** + * Video segments to annotate. The segments may overlap and are not required + * to be contiguous or span the whole video. If unspecified, each video is + * treated as a single segment. + */ + segments?: Schema$GoogleCloudVideointelligenceV1p1beta1_VideoSegment[]; + /** + * Config for SHOT_CHANGE_DETECTION. + */ + shotChangeDetectionConfig?: + Schema$GoogleCloudVideointelligenceV1p1beta1_ShotChangeDetectionConfig; + /** + * Config for SPEECH_TRANSCRIPTION. + */ + speechTranscriptionConfig?: + Schema$GoogleCloudVideointelligenceV1p1beta1_SpeechTranscriptionConfig; + } + /** + * Video segment. + */ + export interface Schema$GoogleCloudVideointelligenceV1p1beta1_VideoSegment { + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * end of the segment (inclusive). + */ + endTimeOffset?: string; + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * start of the segment (inclusive). + */ + startTimeOffset?: string; + } + /** + * Word-specific information for recognized words. Word information is only + * included in the response when certain request parameters are set, such as + * `enable_word_time_offsets`. + */ + export interface Schema$GoogleCloudVideointelligenceV1p1beta1_WordInfo { + /** + * Time offset relative to the beginning of the audio, and corresponding to + * the end of the spoken word. This field is only set if + * `enable_word_time_offsets=true` and only in the top hypothesis. This is + * an experimental feature and the accuracy of the time offset can vary. + */ + endTime?: string; + /** + * Time offset relative to the beginning of the audio, and corresponding to + * the start of the spoken word. This field is only set if + * `enable_word_time_offsets=true` and only in the top hypothesis. This is + * an experimental feature and the accuracy of the time offset can vary. + */ + startTime?: string; + /** + * The word corresponding to this set of information. + */ + word?: string; + } + /** + * Video annotation progress. Included in the `metadata` field of the + * `Operation` returned by the `GetOperation` call of the + * `google::longrunning::Operations` service. + */ + export interface Schema$GoogleCloudVideointelligenceV1_AnnotateVideoProgress { + /** + * Progress metadata for all videos specified in `AnnotateVideoRequest`. + */ + annotationProgress?: + Schema$GoogleCloudVideointelligenceV1_VideoAnnotationProgress[]; + } + /** + * Video annotation response. Included in the `response` field of the + * `Operation` returned by the `GetOperation` call of the + * `google::longrunning::Operations` service. + */ + export interface Schema$GoogleCloudVideointelligenceV1_AnnotateVideoResponse { + /** + * Annotation results for all videos specified in `AnnotateVideoRequest`. + */ + annotationResults?: + Schema$GoogleCloudVideointelligenceV1_VideoAnnotationResults[]; + } + /** + * Detected entity from video analysis. + */ + export interface Schema$GoogleCloudVideointelligenceV1_Entity { + /** + * Textual description, e.g. `Fixed-gear bicycle`. + */ + description?: string; + /** + * Opaque entity ID. Some IDs may be available in [Google Knowledge Graph + * Search API](https://developers.google.com/knowledge-graph/). + */ + entityId?: string; + /** + * Language code for `description` in BCP-47 format. + */ + languageCode?: string; + } + /** + * Explicit content annotation (based on per-frame visual signals only). If no + * explicit content has been detected in a frame, no annotations are present + * for that frame. + */ + export interface Schema$GoogleCloudVideointelligenceV1_ExplicitContentAnnotation { + /** + * All video frames where explicit content was detected. + */ + frames?: Schema$GoogleCloudVideointelligenceV1_ExplicitContentFrame[]; + } + /** + * Video frame level annotation results for explicit content. + */ + export interface Schema$GoogleCloudVideointelligenceV1_ExplicitContentFrame { + /** + * Likelihood of the pornography content.. + */ + pornographyLikelihood?: string; + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * video frame for this location. + */ + timeOffset?: string; + } + /** + * Label annotation. + */ + export interface Schema$GoogleCloudVideointelligenceV1_LabelAnnotation { + /** + * Common categories for the detected entity. E.g. when the label is + * `Terrier` the category is likely `dog`. And in some cases there might be + * more than one categories e.g. `Terrier` could also be a `pet`. + */ + categoryEntities?: Schema$GoogleCloudVideointelligenceV1_Entity[]; + /** + * Detected entity. + */ + entity?: Schema$GoogleCloudVideointelligenceV1_Entity; + /** + * All video frames where a label was detected. + */ + frames?: Schema$GoogleCloudVideointelligenceV1_LabelFrame[]; + /** + * All video segments where a label was detected. + */ + segments?: Schema$GoogleCloudVideointelligenceV1_LabelSegment[]; + } + /** + * Video frame level annotation results for label detection. + */ + export interface Schema$GoogleCloudVideointelligenceV1_LabelFrame { + /** + * Confidence that the label is accurate. Range: [0, 1]. + */ + confidence?: number; + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * video frame for this location. + */ + timeOffset?: string; + } + /** + * Video segment level annotation results for label detection. + */ + export interface Schema$GoogleCloudVideointelligenceV1_LabelSegment { + /** + * Confidence that the label is accurate. Range: [0, 1]. + */ + confidence?: number; + /** + * Video segment where a label was detected. + */ + segment?: Schema$GoogleCloudVideointelligenceV1_VideoSegment; + } + /** + * Annotation progress for a single video. + */ + export interface Schema$GoogleCloudVideointelligenceV1_VideoAnnotationProgress { + /** + * Video file location in [Google Cloud + * Storage](https://cloud.google.com/storage/). + */ + inputUri?: string; + /** + * Approximate percentage processed thus far. Guaranteed to be 100 when + * fully processed. + */ + progressPercent?: number; + /** + * Time when the request was received. + */ + startTime?: string; + /** + * Time of the most recent update. + */ + updateTime?: string; + } + /** + * Annotation results for a single video. + */ + export interface Schema$GoogleCloudVideointelligenceV1_VideoAnnotationResults { + /** + * If set, indicates an error. Note that for a single `AnnotateVideoRequest` + * some videos may succeed and some may fail. + */ + error?: Schema$GoogleRpc_Status; + /** + * Explicit content annotation. + */ + explicitAnnotation?: + Schema$GoogleCloudVideointelligenceV1_ExplicitContentAnnotation; + /** + * Label annotations on frame level. There is exactly one element for each + * unique label. + */ + frameLabelAnnotations?: + Schema$GoogleCloudVideointelligenceV1_LabelAnnotation[]; + /** + * Video file location in [Google Cloud + * Storage](https://cloud.google.com/storage/). + */ + inputUri?: string; + /** + * Label annotations on video level or user specified segment level. There + * is exactly one element for each unique label. + */ + segmentLabelAnnotations?: + Schema$GoogleCloudVideointelligenceV1_LabelAnnotation[]; + /** + * Shot annotations. Each shot is represented as a video segment. + */ + shotAnnotations?: Schema$GoogleCloudVideointelligenceV1_VideoSegment[]; + /** + * Label annotations on shot level. There is exactly one element for each + * unique label. + */ + shotLabelAnnotations?: + Schema$GoogleCloudVideointelligenceV1_LabelAnnotation[]; + } + /** + * Video segment. + */ + export interface Schema$GoogleCloudVideointelligenceV1_VideoSegment { + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * end of the segment (inclusive). + */ + endTimeOffset?: string; + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * start of the segment (inclusive). + */ + startTimeOffset?: string; + } + /** + * This resource represents a long-running operation that is the result of a + * network API call. + */ + export interface Schema$GoogleLongrunning_Operation { + /** + * If the value is `false`, it means the operation is still in progress. If + * `true`, the operation is completed, and either `error` or `response` is + * available. + */ + done?: boolean; + /** + * The error result of the operation in case of failure or cancellation. + */ + error?: Schema$GoogleRpc_Status; + /** + * Service-specific metadata associated with the operation. It typically + * contains progress information and common metadata such as create time. + * Some services might not provide such metadata. Any method that returns a + * long-running operation should document the metadata type, if any. + */ + metadata?: any; + /** + * The server-assigned name, which is only unique within the same service + * that originally returns it. If you use the default HTTP mapping, the + * `name` should have the format of `operations/some/unique/name`. + */ + name?: string; + /** + * The normal response of the operation in case of success. If the original + * method returns no data on success, such as `Delete`, the response is + * `google.protobuf.Empty`. If the original method is standard + * `Get`/`Create`/`Update`, the response should be the resource. For other + * methods, the response should have the type `XxxResponse`, where `Xxx` is + * the original method name. For example, if the original method name is + * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + */ + response?: any; + } + /** + * The `Status` type defines a logical error model that is suitable for + * different programming environments, including REST APIs and RPC APIs. It is + * used by [gRPC](https://github.com/grpc). The error model is designed to be: + * - Simple to use and understand for most users - Flexible enough to meet + * unexpected needs # Overview The `Status` message contains three pieces of + * data: error code, error message, and error details. The error code should + * be an enum value of google.rpc.Code, but it may accept additional error + * codes if needed. The error message should be a developer-facing English + * message that helps developers *understand* and *resolve* the error. If a + * localized user-facing error message is needed, put the localized message in + * the error details or localize it in the client. The optional error details + * may contain arbitrary information about the error. There is a predefined + * set of error detail types in the package `google.rpc` that can be used for + * common error conditions. # Language mapping The `Status` message is the + * logical representation of the error model, but it is not necessarily the + * actual wire format. When the `Status` message is exposed in different + * client libraries and different wire protocols, it can be mapped + * differently. For example, it will likely be mapped to some exceptions in + * Java, but more likely mapped to some error codes in C. # Other uses The + * error model and the `Status` message can be used in a variety of + * environments, either with or without APIs, to provide a consistent + * developer experience across different environments. Example uses of this + * error model include: - Partial errors. If a service needs to return + * partial errors to the client, it may embed the `Status` in the normal + * response to indicate the partial errors. - Workflow errors. A typical + * workflow has multiple steps. Each step may have a `Status` message for + * error reporting. - Batch operations. If a client uses batch request and + * batch response, the `Status` message should be used directly inside + * batch response, one for each error sub-response. - Asynchronous + * operations. If an API call embeds asynchronous operation results in its + * response, the status of those operations should be represented directly + * using the `Status` message. - Logging. If some API errors are stored in + * logs, the message `Status` could be used directly after any stripping + * needed for security/privacy reasons. + */ + export interface Schema$GoogleRpc_Status { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set + * of message types for APIs to use. + */ + details?: any[]; + /** + * A developer-facing error message, which should be in English. Any + * user-facing error message should be localized and sent in the + * google.rpc.Status.details field, or localized by the client. + */ + message?: string; + } + + + export class Resource$Videos { + root: Videointelligence; + constructor(root: Videointelligence) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * videointelligence.videos.annotate + * @desc Performs asynchronous video annotation. Progress and results can be + * retrieved through the `google.longrunning.Operations` interface. + * `Operation.metadata` contains `AnnotateVideoProgress` (progress). + * `Operation.response` contains `AnnotateVideoResponse` (results). + * @alias videointelligence.videos.annotate + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + annotate(params?: Params$Resource$Videos$Annotate, options?: MethodOptions): + AxiosPromise; + annotate( + params: Params$Resource$Videos$Annotate, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + annotate( + params: Params$Resource$Videos$Annotate, + callback: BodyResponseCallback): + void; + annotate(callback: + BodyResponseCallback): + void; + annotate( + paramsOrCallback?: Params$Resource$Videos$Annotate| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Videos$Annotate; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Videos$Annotate; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://videointelligence.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1p1beta1/videos:annotate') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Videos$Annotate { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: + Schema$GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoRequest; + } +} diff --git a/src/apis/vision/v1.ts b/src/apis/vision/v1.ts index 6b5cf01b295..ded22349b86 100644 --- a/src/apis/vision/v1.ts +++ b/src/apis/vision/v1.ts @@ -145,6 +145,11 @@ export namespace vision_v1 { * If present, landmark detection has completed successfully. */ landmarkAnnotations?: Schema$EntityAnnotation[]; + /** + * If present, localized object detection has completed successfully. This + * will be sorted descending by confidence score. + */ + localizedObjectAnnotations?: Schema$LocalizedObjectAnnotation[]; /** * If present, logo detection has completed successfully. */ @@ -709,6 +714,12 @@ export namespace vision_v1 { * If present, landmark detection has completed successfully. */ landmarkAnnotations?: Schema$GoogleCloudVisionV1p1beta1EntityAnnotation[]; + /** + * If present, localized object detection has completed successfully. This + * will be sorted descending by confidence score. + */ + localizedObjectAnnotations?: + Schema$GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation[]; /** * If present, logo detection has completed successfully. */ @@ -1060,6 +1071,33 @@ export namespace vision_v1 { */ mimeType?: string; } + /** + * Set of detected objects with bounding boxes. + */ + export interface Schema$GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation { + /** + * Image region to which this object belongs. This must be populated. + */ + boundingPoly?: Schema$GoogleCloudVisionV1p1beta1BoundingPoly; + /** + * The BCP-47 language code, such as "en-US" or + * "sr-Latn". For more information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + */ + languageCode?: string; + /** + * Object ID that should align with EntityAnnotation mid. + */ + mid?: string; + /** + * Object name, expressed in its `language_code` language. + */ + name?: string; + /** + * Score of the result. Range [0, 1]. + */ + score?: number; + } /** * Detected entity location information. */ @@ -1532,6 +1570,12 @@ export namespace vision_v1 { * If present, landmark detection has completed successfully. */ landmarkAnnotations?: Schema$GoogleCloudVisionV1p2beta1EntityAnnotation[]; + /** + * If present, localized object detection has completed successfully. This + * will be sorted descending by confidence score. + */ + localizedObjectAnnotations?: + Schema$GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation[]; /** * If present, logo detection has completed successfully. */ @@ -1887,6 +1931,33 @@ export namespace vision_v1 { */ mimeType?: string; } + /** + * Set of detected objects with bounding boxes. + */ + export interface Schema$GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation { + /** + * Image region to which this object belongs. This must be populated. + */ + boundingPoly?: Schema$GoogleCloudVisionV1p2beta1BoundingPoly; + /** + * The BCP-47 language code, such as "en-US" or + * "sr-Latn". For more information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + */ + languageCode?: string; + /** + * Object ID that should align with EntityAnnotation mid. + */ + mid?: string; + /** + * Object name, expressed in its `language_code` language. + */ + name?: string; + /** + * Score of the result. Range [0, 1]. + */ + score?: number; + } /** * Detected entity location information. */ @@ -3018,8 +3089,7 @@ export namespace vision_v1 { product?: Schema$GoogleCloudVisionV1p3beta1Product; /** * A confidence level on the match, ranging from 0 (no confidence) to 1 - * (full confidence). This field is returned only if `view` is set to - * `FULL` in the request. + * (full confidence). */ score?: number; } @@ -3512,6 +3582,33 @@ export namespace vision_v1 { */ operations?: Schema$Operation[]; } + /** + * Set of detected objects with bounding boxes. + */ + export interface Schema$LocalizedObjectAnnotation { + /** + * Image region to which this object belongs. This must be populated. + */ + boundingPoly?: Schema$BoundingPoly; + /** + * The BCP-47 language code, such as "en-US" or + * "sr-Latn". For more information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + */ + languageCode?: string; + /** + * Object ID that should align with EntityAnnotation mid. + */ + mid?: string; + /** + * Object name, expressed in its `language_code` language. + */ + name?: string; + /** + * Score of the result. Range [0, 1]. + */ + score?: number; + } /** * Detected entity location information. */ diff --git a/src/apis/vision/v1p1beta1.ts b/src/apis/vision/v1p1beta1.ts index 9245f318461..544157bcbf7 100644 --- a/src/apis/vision/v1p1beta1.ts +++ b/src/apis/vision/v1p1beta1.ts @@ -123,6 +123,11 @@ export namespace vision_v1p1beta1 { * If present, landmark detection has completed successfully. */ landmarkAnnotations?: Schema$EntityAnnotation[]; + /** + * If present, localized object detection has completed successfully. This + * will be sorted descending by confidence score. + */ + localizedObjectAnnotations?: Schema$LocalizedObjectAnnotation[]; /** * If present, logo detection has completed successfully. */ @@ -608,6 +613,12 @@ export namespace vision_v1p1beta1 { * If present, landmark detection has completed successfully. */ landmarkAnnotations?: Schema$GoogleCloudVisionV1p1beta1EntityAnnotation[]; + /** + * If present, localized object detection has completed successfully. This + * will be sorted descending by confidence score. + */ + localizedObjectAnnotations?: + Schema$GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation[]; /** * If present, logo detection has completed successfully. */ @@ -1130,6 +1141,33 @@ export namespace vision_v1p1beta1 { */ minLatLng?: Schema$LatLng; } + /** + * Set of detected objects with bounding boxes. + */ + export interface Schema$GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation { + /** + * Image region to which this object belongs. This must be populated. + */ + boundingPoly?: Schema$GoogleCloudVisionV1p1beta1BoundingPoly; + /** + * The BCP-47 language code, such as "en-US" or + * "sr-Latn". For more information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + */ + languageCode?: string; + /** + * Object ID that should align with EntityAnnotation mid. + */ + mid?: string; + /** + * Object name, expressed in its `language_code` language. + */ + name?: string; + /** + * Score of the result. Range [0, 1]. + */ + score?: number; + } /** * Detected entity location information. */ @@ -1611,6 +1649,12 @@ export namespace vision_v1p1beta1 { * If present, landmark detection has completed successfully. */ landmarkAnnotations?: Schema$GoogleCloudVisionV1p2beta1EntityAnnotation[]; + /** + * If present, localized object detection has completed successfully. This + * will be sorted descending by confidence score. + */ + localizedObjectAnnotations?: + Schema$GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation[]; /** * If present, logo detection has completed successfully. */ @@ -1966,6 +2010,33 @@ export namespace vision_v1p1beta1 { */ mimeType?: string; } + /** + * Set of detected objects with bounding boxes. + */ + export interface Schema$GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation { + /** + * Image region to which this object belongs. This must be populated. + */ + boundingPoly?: Schema$GoogleCloudVisionV1p2beta1BoundingPoly; + /** + * The BCP-47 language code, such as "en-US" or + * "sr-Latn". For more information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + */ + languageCode?: string; + /** + * Object ID that should align with EntityAnnotation mid. + */ + mid?: string; + /** + * Object name, expressed in its `language_code` language. + */ + name?: string; + /** + * Score of the result. Range [0, 1]. + */ + score?: number; + } /** * Detected entity location information. */ @@ -3097,8 +3168,7 @@ export namespace vision_v1p1beta1 { product?: Schema$GoogleCloudVisionV1p3beta1Product; /** * A confidence level on the match, ranging from 0 (no confidence) to 1 - * (full confidence). This field is returned only if `view` is set to - * `FULL` in the request. + * (full confidence). */ score?: number; } @@ -3492,6 +3562,33 @@ export namespace vision_v1p1beta1 { */ longitude?: number; } + /** + * Set of detected objects with bounding boxes. + */ + export interface Schema$LocalizedObjectAnnotation { + /** + * Image region to which this object belongs. This must be populated. + */ + boundingPoly?: Schema$BoundingPoly; + /** + * The BCP-47 language code, such as "en-US" or + * "sr-Latn". For more information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + */ + languageCode?: string; + /** + * Object ID that should align with EntityAnnotation mid. + */ + mid?: string; + /** + * Object name, expressed in its `language_code` language. + */ + name?: string; + /** + * Score of the result. Range [0, 1]. + */ + score?: number; + } /** * Detected entity location information. */ diff --git a/src/apis/vision/v1p2beta1.ts b/src/apis/vision/v1p2beta1.ts index 5cc8ff61334..7113a877db7 100644 --- a/src/apis/vision/v1p2beta1.ts +++ b/src/apis/vision/v1p2beta1.ts @@ -123,6 +123,11 @@ export namespace vision_v1p2beta1 { * If present, landmark detection has completed successfully. */ landmarkAnnotations?: Schema$EntityAnnotation[]; + /** + * If present, localized object detection has completed successfully. This + * will be sorted descending by confidence score. + */ + localizedObjectAnnotations?: Schema$LocalizedObjectAnnotation[]; /** * If present, logo detection has completed successfully. */ @@ -590,6 +595,12 @@ export namespace vision_v1p2beta1 { * If present, landmark detection has completed successfully. */ landmarkAnnotations?: Schema$GoogleCloudVisionV1p1beta1EntityAnnotation[]; + /** + * If present, localized object detection has completed successfully. This + * will be sorted descending by confidence score. + */ + localizedObjectAnnotations?: + Schema$GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation[]; /** * If present, logo detection has completed successfully. */ @@ -941,6 +952,33 @@ export namespace vision_v1p2beta1 { */ mimeType?: string; } + /** + * Set of detected objects with bounding boxes. + */ + export interface Schema$GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation { + /** + * Image region to which this object belongs. This must be populated. + */ + boundingPoly?: Schema$GoogleCloudVisionV1p1beta1BoundingPoly; + /** + * The BCP-47 language code, such as "en-US" or + * "sr-Latn". For more information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + */ + languageCode?: string; + /** + * Object ID that should align with EntityAnnotation mid. + */ + mid?: string; + /** + * Object name, expressed in its `language_code` language. + */ + name?: string; + /** + * Score of the result. Range [0, 1]. + */ + score?: number; + } /** * Detected entity location information. */ @@ -1431,6 +1469,12 @@ export namespace vision_v1p2beta1 { * If present, landmark detection has completed successfully. */ landmarkAnnotations?: Schema$GoogleCloudVisionV1p2beta1EntityAnnotation[]; + /** + * If present, localized object detection has completed successfully. This + * will be sorted descending by confidence score. + */ + localizedObjectAnnotations?: + Schema$GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation[]; /** * If present, logo detection has completed successfully. */ @@ -1957,6 +2001,33 @@ export namespace vision_v1p2beta1 { */ minLatLng?: Schema$LatLng; } + /** + * Set of detected objects with bounding boxes. + */ + export interface Schema$GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation { + /** + * Image region to which this object belongs. This must be populated. + */ + boundingPoly?: Schema$GoogleCloudVisionV1p2beta1BoundingPoly; + /** + * The BCP-47 language code, such as "en-US" or + * "sr-Latn". For more information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + */ + languageCode?: string; + /** + * Object ID that should align with EntityAnnotation mid. + */ + mid?: string; + /** + * Object name, expressed in its `language_code` language. + */ + name?: string; + /** + * Score of the result. Range [0, 1]. + */ + score?: number; + } /** * Detected entity location information. */ @@ -3097,8 +3168,7 @@ export namespace vision_v1p2beta1 { product?: Schema$GoogleCloudVisionV1p3beta1Product; /** * A confidence level on the match, ranging from 0 (no confidence) to 1 - * (full confidence). This field is returned only if `view` is set to - * `FULL` in the request. + * (full confidence). */ score?: number; } @@ -3492,6 +3562,33 @@ export namespace vision_v1p2beta1 { */ longitude?: number; } + /** + * Set of detected objects with bounding boxes. + */ + export interface Schema$LocalizedObjectAnnotation { + /** + * Image region to which this object belongs. This must be populated. + */ + boundingPoly?: Schema$BoundingPoly; + /** + * The BCP-47 language code, such as "en-US" or + * "sr-Latn". For more information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + */ + languageCode?: string; + /** + * Object ID that should align with EntityAnnotation mid. + */ + mid?: string; + /** + * Object name, expressed in its `language_code` language. + */ + name?: string; + /** + * Score of the result. Range [0, 1]. + */ + score?: number; + } /** * Detected entity location information. */ diff --git a/src/index.ts b/src/index.ts index b8bb081c743..375aca28d21 100644 --- a/src/index.ts +++ b/src/index.ts @@ -26,9 +26,6 @@ export {adexchangebuyer_v1_2} from './apis/adexchangebuyer/v1.2'; export {adexchangebuyer_v1_3} from './apis/adexchangebuyer/v1.3'; export {adexchangebuyer_v1_4} from './apis/adexchangebuyer/v1.4'; export {adexchangebuyer2_v2beta1} from './apis/adexchangebuyer2/v2beta1'; -export {adexchangeseller_v1_1} from './apis/adexchangeseller/v1.1'; -export {adexchangeseller_v1} from './apis/adexchangeseller/v1'; -export {adexchangeseller_v2_0} from './apis/adexchangeseller/v2.0'; export {adexperiencereport_v1} from './apis/adexperiencereport/v1'; export {admin_datatransfer_v1} from './apis/admin/datatransfer_v1'; export {admin_directory_v1} from './apis/admin/directory_v1'; @@ -116,6 +113,7 @@ export {doubleclickbidmanager_v1} from './apis/doubleclickbidmanager/v1'; export {doubleclicksearch_v2} from './apis/doubleclicksearch/v2'; export {drive_v2} from './apis/drive/v2'; export {drive_v3} from './apis/drive/v3'; +export {file_v1beta1} from './apis/file/v1beta1'; export {firebasedynamiclinks_v1} from './apis/firebasedynamiclinks/v1'; export {firebaserules_v1} from './apis/firebaserules/v1'; export {firestore_v1} from './apis/firestore/v1'; @@ -140,6 +138,7 @@ export {identitytoolkit_v3} from './apis/identitytoolkit/v3'; export {indexing_v3} from './apis/indexing/v3'; export {jobs_v2} from './apis/jobs/v2'; export {jobs_v3} from './apis/jobs/v3'; +export {jobs_v3p1beta1} from './apis/jobs/v3p1beta1'; export {kgsearch_v1} from './apis/kgsearch/v1'; export {language_v1} from './apis/language/v1'; export {language_v1beta1} from './apis/language/v1beta1'; @@ -216,6 +215,7 @@ export {urlshortener_v1} from './apis/urlshortener/v1'; export {vault_v1} from './apis/vault/v1'; export {videointelligence_v1} from './apis/videointelligence/v1'; export {videointelligence_v1beta2} from './apis/videointelligence/v1beta2'; +export {videointelligence_v1p1beta1} from './apis/videointelligence/v1p1beta1'; export {vision_v1} from './apis/vision/v1'; export {vision_v1p1beta1} from './apis/vision/v1p1beta1'; export {vision_v1p2beta1} from './apis/vision/v1p2beta1';