Close httplib2 connections.
endExperiment(experiment, body=None, x__xgafv=None)
Immediately ends an experiment, changing the experiment's scheduled end date and without waiting for end of day. End date is updated to be the time of the request. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [ExperimentError]() [HeaderError]() [InternalError]() [QuotaError]() [RequestError]()
graduateExperiment(experiment, body=None, x__xgafv=None)
Graduates an experiment to a full campaign. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [ExperimentError]() [HeaderError]() [InternalError]() [MutateError]() [QuotaError]() [RequestError]()
listExperimentAsyncErrors(resourceName, pageSize=None, pageToken=None, x__xgafv=None)
Returns all errors that occurred during the last Experiment update (either scheduling or promotion). Supports standard list paging. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [HeaderError]() [InternalError]() [QuotaError]() [RequestError]()
listExperimentAsyncErrors_next()
Retrieves the next page of results.
mutate(customerId, body=None, x__xgafv=None)
Creates, updates, or removes experiments. Operation statuses are returned. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [ExperimentError]() [HeaderError]() [InternalError]() [QuotaError]() [RequestError]()
promoteExperiment(resourceName, body=None, x__xgafv=None)
Promotes the trial campaign thus applying changes in the trial campaign to the base campaign. This method returns a long running operation that tracks the promotion of the experiment campaign. If it fails, a list of errors can be retrieved using the ListExperimentAsyncErrors method. The operation's metadata will be a string containing the resource name of the created experiment. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [ExperimentError]() [HeaderError]() [InternalError]() [QuotaError]() [RequestError]()
scheduleExperiment(resourceName, body=None, x__xgafv=None)
Schedule an experiment. The in design campaign will be converted into a real campaign (called the experiment campaign) that will begin serving ads if successfully created. The experiment is scheduled immediately with status INITIALIZING. This method returns a long running operation that tracks the forking of the in design campaign. If the forking fails, a list of errors can be retrieved using the ListExperimentAsyncErrors method. The operation's metadata will be a string containing the resource name of the created experiment. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [ExperimentError]() [DatabaseError]() [DateError]() [DateRangeError]() [FieldError]() [HeaderError]() [InternalError]() [QuotaError]() [RangeError]() [RequestError]()
close()
Close httplib2 connections.
endExperiment(experiment, body=None, x__xgafv=None)
Immediately ends an experiment, changing the experiment's scheduled end date and without waiting for end of day. End date is updated to be the time of the request. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [ExperimentError]() [HeaderError]() [InternalError]() [QuotaError]() [RequestError]()
Args:
experiment: string, Required. The resource name of the campaign experiment to end. (required)
body: object, The request body.
The object takes the form of:
{ # Request message for ExperimentService.EndExperiment.
"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:
{ # 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); }
}
graduateExperiment(experiment, body=None, x__xgafv=None)
Graduates an experiment to a full campaign. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [ExperimentError]() [HeaderError]() [InternalError]() [MutateError]() [QuotaError]() [RequestError]()
Args:
experiment: string, Required. The experiment to be graduated. (required)
body: object, The request body.
The object takes the form of:
{ # Request message for ExperimentService.GraduateExperiment.
"campaignBudgetMappings": [ # Required. List of campaign budget mappings for graduation. Each campaign that appears here will graduate, and will be assigned a new budget that is paired with it in the mapping. The maximum size is one.
{ # The mapping of experiment campaign and budget to be graduated.
"campaignBudget": "A String", # Required. The budget that should be attached to the graduating experiment campaign.
"experimentCampaign": "A String", # Required. The experiment campaign to graduate.
},
],
"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:
{ # 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); }
}
listExperimentAsyncErrors(resourceName, pageSize=None, pageToken=None, x__xgafv=None)
Returns all errors that occurred during the last Experiment update (either scheduling or promotion). Supports standard list paging. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [HeaderError]() [InternalError]() [QuotaError]() [RequestError]()
Args:
resourceName: string, Required. The name of the experiment 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. The maximum page size is 1000.
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 ExperimentService.ListExperimentAsyncErrors.
"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.
}
listExperimentAsyncErrors_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 experiments. Operation statuses are returned. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [ExperimentError]() [HeaderError]() [InternalError]() [QuotaError]() [RequestError]()
Args:
customerId: string, Required. The ID of the customer whose experiments are being modified. (required)
body: object, The request body.
The object takes the form of:
{ # Request message for ExperimentService.MutateExperiments.
"operations": [ # Required. The list of operations to perform on individual experiments.
{ # A single operation on an experiment.
"create": { # A Google ads experiment for users to experiment changes on multiple campaigns, compare the performance, and apply the effective changes. # Create operation
"description": "A String", # The description of the experiment. It must have a minimum length of 1 and maximum length of 2048.
"endDate": "A String", # Date when the experiment ends. By default, the experiment ends on the campaign's end date. If this field is set, then the experiment ends at the end of the specified date in the customer's time zone. Format: YYYY-MM-DD Example: 2019-04-18
"experimentId": "A String", # Output only. The ID of the experiment. Read only.
"goals": [ # The goals of this experiment.
{ # A metric goal for an experiment.
"direction": "A String", # The metric direction of the goal. For example, increase, decrease, no change.
"metric": "A String", # The metric of the goal. For example, clicks, impressions, cost, conversions, etc.
},
],
"longRunningOperation": "A String", # Output only. The resource name of the long-running operation that can be used to poll for completion of experiment schedule or promote. The most recent long running operation is returned.
"name": "A String", # Required. The name of the experiment. It must have a minimum length of 1 and maximum length of 1024. It must be unique under a customer.
"promoteStatus": "A String", # Output only. The status of the experiment promotion process.
"resourceName": "A String", # Immutable. The resource name of the experiment. Experiment resource names have the form: `customers/{customer_id}/experiments/{experiment_id}`
"startDate": "A String", # Date when the experiment starts. By default, the experiment starts now or on the campaign's start date, whichever is later. If this field is set, then the experiment starts at the beginning of the specified date in the customer's time zone. Format: YYYY-MM-DD Example: 2019-03-14
"status": "A String", # The Advertiser-chosen status of this experiment.
"suffix": "A String", # For system managed experiments, the advertiser must provide a suffix during construction, in the setup stage before moving to initiated. The suffix will be appended to the in-design and experiment campaign names so that the name is base campaign name + suffix.
"syncEnabled": True or False, # Immutable. Set to true if changes to base campaigns should be synced to the trial campaigns. Any changes made directly to trial campaigns will be preserved. This field can only be set when the experiment is being created.
"type": "A String", # Required. The product/feature that uses this experiment.
},
"remove": "A String", # Remove operation: The experiment is expected to have a valid resource name, in this format: `customers/{customer_id}/experiments/{campaign_experiment_id}`
"update": { # A Google ads experiment for users to experiment changes on multiple campaigns, compare the performance, and apply the effective changes. # Update operation: The experiment is expected to have a valid resource name.
"description": "A String", # The description of the experiment. It must have a minimum length of 1 and maximum length of 2048.
"endDate": "A String", # Date when the experiment ends. By default, the experiment ends on the campaign's end date. If this field is set, then the experiment ends at the end of the specified date in the customer's time zone. Format: YYYY-MM-DD Example: 2019-04-18
"experimentId": "A String", # Output only. The ID of the experiment. Read only.
"goals": [ # The goals of this experiment.
{ # A metric goal for an experiment.
"direction": "A String", # The metric direction of the goal. For example, increase, decrease, no change.
"metric": "A String", # The metric of the goal. For example, clicks, impressions, cost, conversions, etc.
},
],
"longRunningOperation": "A String", # Output only. The resource name of the long-running operation that can be used to poll for completion of experiment schedule or promote. The most recent long running operation is returned.
"name": "A String", # Required. The name of the experiment. It must have a minimum length of 1 and maximum length of 1024. It must be unique under a customer.
"promoteStatus": "A String", # Output only. The status of the experiment promotion process.
"resourceName": "A String", # Immutable. The resource name of the experiment. Experiment resource names have the form: `customers/{customer_id}/experiments/{experiment_id}`
"startDate": "A String", # Date when the experiment starts. By default, the experiment starts now or on the campaign's start date, whichever is later. If this field is set, then the experiment starts at the beginning of the specified date in the customer's time zone. Format: YYYY-MM-DD Example: 2019-03-14
"status": "A String", # The Advertiser-chosen status of this experiment.
"suffix": "A String", # For system managed experiments, the advertiser must provide a suffix during construction, in the setup stage before moving to initiated. The suffix will be appended to the in-design and experiment campaign names so that the name is base campaign name + suffix.
"syncEnabled": True or False, # Immutable. Set to true if changes to base campaigns should be synced to the trial campaigns. Any changes made directly to trial campaigns will be preserved. This field can only be set when the experiment is being created.
"type": "A String", # Required. The product/feature that uses this experiment.
},
"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.
"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 experiment 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 experiment mutate.
"resourceName": "A String", # Returned for successful operations.
},
],
}
promoteExperiment(resourceName, body=None, x__xgafv=None)
Promotes the trial campaign thus applying changes in the trial campaign to the base campaign. This method returns a long running operation that tracks the promotion of the experiment campaign. If it fails, a list of errors can be retrieved using the ListExperimentAsyncErrors method. The operation's metadata will be a string containing the resource name of the created experiment. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [ExperimentError]() [HeaderError]() [InternalError]() [QuotaError]() [RequestError]()
Args:
resourceName: string, Required. The resource name of the experiment to promote. (required)
body: object, The request body.
The object takes the form of:
{ # Request message for ExperimentService.PromoteExperiment.
"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:
{ # 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.
},
}
scheduleExperiment(resourceName, body=None, x__xgafv=None)
Schedule an experiment. The in design campaign will be converted into a real campaign (called the experiment campaign) that will begin serving ads if successfully created. The experiment is scheduled immediately with status INITIALIZING. This method returns a long running operation that tracks the forking of the in design campaign. If the forking fails, a list of errors can be retrieved using the ListExperimentAsyncErrors method. The operation's metadata will be a string containing the resource name of the created experiment. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [ExperimentError]() [DatabaseError]() [DateError]() [DateRangeError]() [FieldError]() [HeaderError]() [InternalError]() [QuotaError]() [RangeError]() [RequestError]()
Args:
resourceName: string, Required. The scheduled experiment. (required)
body: object, The request body.
The object takes the form of:
{ # Request message for ExperimentService.ScheduleExperiment.
"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:
{ # 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.
},
}