Close httplib2 connections.
listAsyncErrors(resourceName, pageSize=None, pageToken=None, x__xgafv=None)
Returns all errors that occurred during CampaignDraft promote. Throws an error if called before campaign draft is promoted. Supports standard list paging. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [HeaderError]() [InternalError]() [QuotaError]() [RequestError]()
Retrieves the next page of results.
mutate(customerId, body=None, x__xgafv=None)
Creates, updates, or removes campaign drafts. Operation statuses are returned. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [CampaignDraftError]() [DatabaseError]() [FieldError]() [HeaderError]() [InternalError]() [MutateError]() [QuotaError]() [RequestError]()
promote(campaignDraft, body=None, x__xgafv=None)
Promotes the changes in a draft back to the base campaign. This method returns a Long Running Operation (LRO) indicating if the Promote is done. Use google.longrunning.Operations.GetOperation to poll the LRO until it is done. Only a done status is returned in the response. See the status in the Campaign Draft resource to determine if the promotion was successful. If the LRO failed, use CampaignDraftService.ListCampaignDraftAsyncErrors to view the list of error reasons. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [CampaignDraftError]() [HeaderError]() [InternalError]() [QuotaError]() [RequestError]()
close()
Close httplib2 connections.
listAsyncErrors(resourceName, pageSize=None, pageToken=None, x__xgafv=None)
Returns all errors that occurred during CampaignDraft promote. Throws an error if called before campaign draft is promoted. Supports standard list paging. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [HeaderError]() [InternalError]() [QuotaError]() [RequestError]()
Args:
resourceName: string, Required. The name of the campaign draft from which to retrieve the async errors. (required)
pageSize: integer, Number of elements to retrieve in a single page. When a page request is too large, the server may decide to further limit the number of returned resources.
pageToken: string, Token of the page to retrieve. If not specified, the first page of results will be returned. Use the value obtained from `next_page_token` in the previous response in order to request the next page of results.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response message for CampaignDraftService.ListCampaignDraftAsyncErrors.
"errors": [ # Details of the errors when performing the asynchronous operation.
{ # 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). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
"code": 42, # The status code, which should be an enum value of google.rpc.Code.
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
"a_key": "", # Properties of the object. Contains field @type with type URL.
},
],
"message": "A String", # 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.
},
],
"nextPageToken": "A String", # Pagination token used to retrieve the next page of results. Pass the content of this string as the `page_token` attribute of the next request. `next_page_token` is not returned for the last page.
}
listAsyncErrors_next()
Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call 'execute()' on to request the next
page. Returns None if there are no more items in the collection.
mutate(customerId, body=None, x__xgafv=None)
Creates, updates, or removes campaign drafts. Operation statuses are returned. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [CampaignDraftError]() [DatabaseError]() [FieldError]() [HeaderError]() [InternalError]() [MutateError]() [QuotaError]() [RequestError]()
Args:
customerId: string, Required. The ID of the customer whose campaign drafts are being modified. (required)
body: object, The request body.
The object takes the form of:
{ # Request message for CampaignDraftService.MutateCampaignDrafts.
"operations": [ # Required. The list of operations to perform on individual campaign drafts.
{ # A single operation (create, update, remove) on a campaign draft.
"create": { # A campaign draft. # Create operation: No resource name is expected for the new campaign draft.
"baseCampaign": "A String", # Immutable. The base campaign to which the draft belongs.
"draftCampaign": "A String", # Output only. Resource name of the Campaign that results from overlaying the draft changes onto the base campaign. This field is read-only.
"draftId": "A String", # Output only. The ID of the draft. This field is read-only.
"hasExperimentRunning": True or False, # Output only. Whether there is an experiment based on this draft currently serving.
"longRunningOperation": "A String", # Output only. The resource name of the long-running operation that can be used to poll for completion of draft promotion. This is only set if the draft promotion is in progress or finished.
"name": "A String", # The name of the campaign draft. This field is required and should not be empty when creating new campaign drafts. It must not contain any null (code point 0x0), NL line feed (code point 0xA) or carriage return (code point 0xD) characters.
"resourceName": "A String", # Immutable. The resource name of the campaign draft. Campaign draft resource names have the form: `customers/{customer_id}/campaignDrafts/{base_campaign_id}~{draft_id}`
"status": "A String", # Output only. The status of the campaign draft. This field is read-only. When a new campaign draft is added, the status defaults to PROPOSED.
},
"remove": "A String", # Remove operation: The campaign draft is expected to have a valid resource name, in this format: `customers/{customer_id}/campaignDrafts/{base_campaign_id}~{draft_id}`
"update": { # A campaign draft. # Update operation: The campaign draft is expected to have a valid resource name.
"baseCampaign": "A String", # Immutable. The base campaign to which the draft belongs.
"draftCampaign": "A String", # Output only. Resource name of the Campaign that results from overlaying the draft changes onto the base campaign. This field is read-only.
"draftId": "A String", # Output only. The ID of the draft. This field is read-only.
"hasExperimentRunning": True or False, # Output only. Whether there is an experiment based on this draft currently serving.
"longRunningOperation": "A String", # Output only. The resource name of the long-running operation that can be used to poll for completion of draft promotion. This is only set if the draft promotion is in progress or finished.
"name": "A String", # The name of the campaign draft. This field is required and should not be empty when creating new campaign drafts. It must not contain any null (code point 0x0), NL line feed (code point 0xA) or carriage return (code point 0xD) characters.
"resourceName": "A String", # Immutable. The resource name of the campaign draft. Campaign draft resource names have the form: `customers/{customer_id}/campaignDrafts/{base_campaign_id}~{draft_id}`
"status": "A String", # Output only. The status of the campaign draft. This field is read-only. When a new campaign draft is added, the status defaults to PROPOSED.
},
"updateMask": "A String", # FieldMask that determines which resource fields are modified in an update.
},
],
"partialFailure": True or False, # If true, successful operations will be carried out and invalid operations will return errors. If false, all operations will be carried out in one transaction if and only if they are all valid. Default is false.
"responseContentType": "A String", # The response content type setting. Determines whether the mutable resource or just the resource name should be returned post mutation.
"validateOnly": True or False, # If true, the request is validated but not executed. Only errors are returned, not results.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response message for campaign draft mutate.
"partialFailureError": { # 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). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Errors that pertain to operation failures in the partial failure mode. Returned only when partial_failure = true and all errors occur inside the operations. If any errors occur outside the operations (for example, auth errors), we return an RPC level error.
"code": 42, # The status code, which should be an enum value of google.rpc.Code.
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
"a_key": "", # Properties of the object. Contains field @type with type URL.
},
],
"message": "A String", # 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.
},
"results": [ # All results for the mutate.
{ # The result for the campaign draft mutate.
"campaignDraft": { # A campaign draft. # The mutated campaign draft with only mutable fields after mutate. The field will only be returned when response_content_type is set to "MUTABLE_RESOURCE".
"baseCampaign": "A String", # Immutable. The base campaign to which the draft belongs.
"draftCampaign": "A String", # Output only. Resource name of the Campaign that results from overlaying the draft changes onto the base campaign. This field is read-only.
"draftId": "A String", # Output only. The ID of the draft. This field is read-only.
"hasExperimentRunning": True or False, # Output only. Whether there is an experiment based on this draft currently serving.
"longRunningOperation": "A String", # Output only. The resource name of the long-running operation that can be used to poll for completion of draft promotion. This is only set if the draft promotion is in progress or finished.
"name": "A String", # The name of the campaign draft. This field is required and should not be empty when creating new campaign drafts. It must not contain any null (code point 0x0), NL line feed (code point 0xA) or carriage return (code point 0xD) characters.
"resourceName": "A String", # Immutable. The resource name of the campaign draft. Campaign draft resource names have the form: `customers/{customer_id}/campaignDrafts/{base_campaign_id}~{draft_id}`
"status": "A String", # Output only. The status of the campaign draft. This field is read-only. When a new campaign draft is added, the status defaults to PROPOSED.
},
"resourceName": "A String", # Returned for successful operations.
},
],
}
promote(campaignDraft, body=None, x__xgafv=None)
Promotes the changes in a draft back to the base campaign. This method returns a Long Running Operation (LRO) indicating if the Promote is done. Use google.longrunning.Operations.GetOperation to poll the LRO until it is done. Only a done status is returned in the response. See the status in the Campaign Draft resource to determine if the promotion was successful. If the LRO failed, use CampaignDraftService.ListCampaignDraftAsyncErrors to view the list of error reasons. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [CampaignDraftError]() [HeaderError]() [InternalError]() [QuotaError]() [RequestError]()
Args:
campaignDraft: string, Required. The resource name of the campaign draft to promote. (required)
body: object, The request body.
The object takes the form of:
{ # Request message for CampaignDraftService.PromoteCampaignDraft.
"validateOnly": True or False, # If true, the request is validated but no Long Running Operation is created. Only errors are returned.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # This resource represents a long-running operation that is the result of a network API call.
"done": True or False, # 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.
"error": { # 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). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
"code": 42, # The status code, which should be an enum value of google.rpc.Code.
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
"a_key": "", # Properties of the object. Contains field @type with type URL.
},
],
"message": "A String", # 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.
},
"metadata": { # 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.
"a_key": "", # Properties of the object. Contains field @type with type URL.
},
"name": "A String", # 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 be a resource name ending with `operations/{unique_id}`.
"response": { # The normal, successful response of the operation. 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`.
"a_key": "", # Properties of the object. Contains field @type with type URL.
},
}