Search Ads 360 Reporting API . customers . assetSets

Instance Methods

close()

Close httplib2 connections.

mutate(customerId, body=None, x__xgafv=None)

Creates, updates or removes asset sets. Operation statuses are returned.

Method Details

close()
Close httplib2 connections.
mutate(customerId, body=None, x__xgafv=None)
Creates, updates or removes asset sets. Operation statuses are returned.

Args:
  customerId: string, Required. The ID of the customer whose asset sets are being modified. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request message for AssetSetService.MutateAssetSets.
  "operations": [ # Required. The list of operations to perform on individual asset sets.
    { # A single operation (create, remove) on an asset set.
      "create": { # An asset set representing a collection of assets. Use AssetSetAsset to link an asset to the asset set. # Create operation: No resource name is expected for the new asset set
        "businessProfileLocationGroup": { # Information about a Business Profile dynamic location group. Only applicable if the sync level AssetSet's type is LOCATION_SYNC and sync source is Business Profile. # Business Profile location group asset set data.
          "dynamicBusinessProfileLocationGroupFilter": { # Represents a filter on Business Profile locations in an asset set. If multiple filters are provided, they are AND'ed together. # Filter for dynamic Business Profile location sets.
            "businessNameFilter": { # Business Profile location group business name filter. # Used to filter Business Profile locations by business name.
              "businessName": "A String", # Business name string to use for filtering.
              "filterType": "A String", # The type of string matching to use when filtering with business_name.
            },
            "labelFilters": [ # Used to filter Business Profile locations by label. Only locations that have any of the listed labels will be in the asset set. Label filters are OR'ed together.
              "A String",
            ],
            "listingIdFilters": [ # Used to filter Business Profile locations by listing ids.
              "A String",
            ],
          },
        },
        "chainLocationGroup": { # Represents information about a Chain dynamic location group. Only applicable if the sync level AssetSet's type is LOCATION_SYNC and sync source is chain. # Represents information about a Chain dynamic location group. Only applicable if the sync level AssetSet's type is LOCATION_SYNC and sync source is chain.
          "dynamicChainLocationGroupFilters": [ # Used to filter chain locations by chain ids. Only Locations that belong to the specified chain(s) will be in the asset set.
            { # One chain level filter on location in a feed item set. The filtering logic among all the fields is AND.
              "chainId": "A String", # Required. Used to filter chain locations by chain id. Only chain locations that belong to the specified chain will be in the asset set.
              "locationAttributes": [ # Used to filter chain locations by location attributes. Only chain locations that belong to all of the specified attribute(s) will be in the asset set. If this field is empty, it means no filtering on this field.
                "A String",
              ],
            },
          ],
        },
        "hotelPropertyData": { # For Performance Max for travel goals campaigns with a Hotel Center account link. Read-only. # Output only. For Performance Max for travel goals campaigns with a Hotel Center account link. Read-only.
          "hotelCenterId": "A String", # Output only. The hotel center ID of the partner.
          "partnerName": "A String", # Output only. Name of the hotel partner.
        },
        "id": "A String", # Output only. The ID of the asset set.
        "locationGroupParentAssetSetId": "A String", # Immutable. Parent asset set ID for the asset set where the elements of this asset set come from. For example: the sync level location AssetSet id where the elements in LocationGroup AssetSet come from. This field is required and only applicable for Location Group typed AssetSet.
        "locationSet": { # Data related to location set. One of the Google Business Profile (previously known as Google My Business) data, Chain data, and map location data need to be specified. # Location asset set data. This will be used for sync level location set. This can only be set if AssetSet's type is LOCATION_SYNC.
          "businessProfileLocationSet": { # Data used to configure a location set populated from Google Business Profile locations. Different types of filters are AND'ed together, if they are specified. # Data used to configure a location set populated from Google Business Profile locations.
            "businessAccountId": "A String", # Immutable. The account ID of the managed business whose locations are to be used. If this field is not set, then all businesses accessible by the user (specified by the emailAddress) are used.
            "businessNameFilter": "A String", # Used to filter Google Business Profile listings by business name. If businessNameFilter is set, only listings with a matching business name are candidates to be sync'd into Assets.
            "emailAddress": "A String", # Required. Immutable. Email address of a Google Business Profile account or email address of a manager of the Google Business Profile account.
            "httpAuthorizationToken": "A String", # Required. Immutable. The HTTP authorization token used to obtain authorization.
            "labelFilters": [ # Used to filter Google Business Profile listings by labels. If entries exist in labelFilters, only listings that have any of the labels set are candidates to be synchronized into Assets. If no entries exist in labelFilters, then all listings are candidates for syncing. Label filters are OR'ed together.
              "A String",
            ],
            "listingIdFilters": [ # Used to filter Google Business Profile listings by listing id. If entries exist in listingIdFilters, only listings specified by the filters are candidates to be synchronized into Assets. If no entries exist in listingIdFilters, then all listings are candidates for syncing. Listing ID filters are OR'ed together.
              "A String",
            ],
          },
          "chainLocationSet": { # Data used to configure a location set populated with the specified chains. # Data used to configure a location on chain set populated with the specified chains.
            "chains": [ # Required. A list of chain level filters, all filters are OR'ed together.
              { # One chain level filter on location in a feed item set. The filtering logic among all the fields is AND.
                "chainId": "A String", # Required. Used to filter chain locations by chain id. Only chain locations that belong to the specified chain will be in the asset set.
                "locationAttributes": [ # Used to filter chain locations by location attributes. Only chain locations that belong to all of the specified attribute(s) will be in the asset set. If this field is empty, it means no filtering on this field.
                  "A String",
                ],
              },
            ],
            "relationshipType": "A String", # Required. Immutable. Relationship type the specified chains have with this advertiser.
          },
          "locationOwnershipType": "A String", # Required. Immutable. Location Ownership Type (owned location or affiliate location).
          "mapsLocationSet": { # Wrapper for multiple maps location sync data # Only set if locations are synced based on selected maps locations
            "mapsLocations": [ # Required. A list of maps location info that user manually synced in.
              { # Wrapper for place ids
                "placeId": "A String", # Place ID of the Maps location.
              },
            ],
          },
        },
        "merchantCenterFeed": { # Merchant ID and Feed Label from Google Merchant Center. # Merchant ID and Feed Label from Google Merchant Center.
          "feedLabel": "A String", # Optional. Feed Label from Google Merchant Center.
          "merchantId": "A String", # Required. Merchant ID from Google Merchant Center
        },
        "name": "A String", # Required. Name of the asset set. Required. It must have a minimum length of 1 and maximum length of 128.
        "resourceName": "A String", # Immutable. The resource name of the asset set. Asset set resource names have the form: `customers/{customer_id}/assetSets/{asset_set_id}`
        "status": "A String", # Output only. The status of the asset set. Read-only.
        "type": "A String", # Required. Immutable. The type of the asset set. Required.
      },
      "remove": "A String", # Remove operation: A resource name for the removed asset set is expected, in this format: `customers/{customer_id}/assetSets/{asset_set_id}`
      "update": { # An asset set representing a collection of assets. Use AssetSetAsset to link an asset to the asset set. # Update operation: The asset set is expected to have a valid resource name.
        "businessProfileLocationGroup": { # Information about a Business Profile dynamic location group. Only applicable if the sync level AssetSet's type is LOCATION_SYNC and sync source is Business Profile. # Business Profile location group asset set data.
          "dynamicBusinessProfileLocationGroupFilter": { # Represents a filter on Business Profile locations in an asset set. If multiple filters are provided, they are AND'ed together. # Filter for dynamic Business Profile location sets.
            "businessNameFilter": { # Business Profile location group business name filter. # Used to filter Business Profile locations by business name.
              "businessName": "A String", # Business name string to use for filtering.
              "filterType": "A String", # The type of string matching to use when filtering with business_name.
            },
            "labelFilters": [ # Used to filter Business Profile locations by label. Only locations that have any of the listed labels will be in the asset set. Label filters are OR'ed together.
              "A String",
            ],
            "listingIdFilters": [ # Used to filter Business Profile locations by listing ids.
              "A String",
            ],
          },
        },
        "chainLocationGroup": { # Represents information about a Chain dynamic location group. Only applicable if the sync level AssetSet's type is LOCATION_SYNC and sync source is chain. # Represents information about a Chain dynamic location group. Only applicable if the sync level AssetSet's type is LOCATION_SYNC and sync source is chain.
          "dynamicChainLocationGroupFilters": [ # Used to filter chain locations by chain ids. Only Locations that belong to the specified chain(s) will be in the asset set.
            { # One chain level filter on location in a feed item set. The filtering logic among all the fields is AND.
              "chainId": "A String", # Required. Used to filter chain locations by chain id. Only chain locations that belong to the specified chain will be in the asset set.
              "locationAttributes": [ # Used to filter chain locations by location attributes. Only chain locations that belong to all of the specified attribute(s) will be in the asset set. If this field is empty, it means no filtering on this field.
                "A String",
              ],
            },
          ],
        },
        "hotelPropertyData": { # For Performance Max for travel goals campaigns with a Hotel Center account link. Read-only. # Output only. For Performance Max for travel goals campaigns with a Hotel Center account link. Read-only.
          "hotelCenterId": "A String", # Output only. The hotel center ID of the partner.
          "partnerName": "A String", # Output only. Name of the hotel partner.
        },
        "id": "A String", # Output only. The ID of the asset set.
        "locationGroupParentAssetSetId": "A String", # Immutable. Parent asset set ID for the asset set where the elements of this asset set come from. For example: the sync level location AssetSet id where the elements in LocationGroup AssetSet come from. This field is required and only applicable for Location Group typed AssetSet.
        "locationSet": { # Data related to location set. One of the Google Business Profile (previously known as Google My Business) data, Chain data, and map location data need to be specified. # Location asset set data. This will be used for sync level location set. This can only be set if AssetSet's type is LOCATION_SYNC.
          "businessProfileLocationSet": { # Data used to configure a location set populated from Google Business Profile locations. Different types of filters are AND'ed together, if they are specified. # Data used to configure a location set populated from Google Business Profile locations.
            "businessAccountId": "A String", # Immutable. The account ID of the managed business whose locations are to be used. If this field is not set, then all businesses accessible by the user (specified by the emailAddress) are used.
            "businessNameFilter": "A String", # Used to filter Google Business Profile listings by business name. If businessNameFilter is set, only listings with a matching business name are candidates to be sync'd into Assets.
            "emailAddress": "A String", # Required. Immutable. Email address of a Google Business Profile account or email address of a manager of the Google Business Profile account.
            "httpAuthorizationToken": "A String", # Required. Immutable. The HTTP authorization token used to obtain authorization.
            "labelFilters": [ # Used to filter Google Business Profile listings by labels. If entries exist in labelFilters, only listings that have any of the labels set are candidates to be synchronized into Assets. If no entries exist in labelFilters, then all listings are candidates for syncing. Label filters are OR'ed together.
              "A String",
            ],
            "listingIdFilters": [ # Used to filter Google Business Profile listings by listing id. If entries exist in listingIdFilters, only listings specified by the filters are candidates to be synchronized into Assets. If no entries exist in listingIdFilters, then all listings are candidates for syncing. Listing ID filters are OR'ed together.
              "A String",
            ],
          },
          "chainLocationSet": { # Data used to configure a location set populated with the specified chains. # Data used to configure a location on chain set populated with the specified chains.
            "chains": [ # Required. A list of chain level filters, all filters are OR'ed together.
              { # One chain level filter on location in a feed item set. The filtering logic among all the fields is AND.
                "chainId": "A String", # Required. Used to filter chain locations by chain id. Only chain locations that belong to the specified chain will be in the asset set.
                "locationAttributes": [ # Used to filter chain locations by location attributes. Only chain locations that belong to all of the specified attribute(s) will be in the asset set. If this field is empty, it means no filtering on this field.
                  "A String",
                ],
              },
            ],
            "relationshipType": "A String", # Required. Immutable. Relationship type the specified chains have with this advertiser.
          },
          "locationOwnershipType": "A String", # Required. Immutable. Location Ownership Type (owned location or affiliate location).
          "mapsLocationSet": { # Wrapper for multiple maps location sync data # Only set if locations are synced based on selected maps locations
            "mapsLocations": [ # Required. A list of maps location info that user manually synced in.
              { # Wrapper for place ids
                "placeId": "A String", # Place ID of the Maps location.
              },
            ],
          },
        },
        "merchantCenterFeed": { # Merchant ID and Feed Label from Google Merchant Center. # Merchant ID and Feed Label from Google Merchant Center.
          "feedLabel": "A String", # Optional. Feed Label from Google Merchant Center.
          "merchantId": "A String", # Required. Merchant ID from Google Merchant Center
        },
        "name": "A String", # Required. Name of the asset set. Required. It must have a minimum length of 1 and maximum length of 128.
        "resourceName": "A String", # Immutable. The resource name of the asset set. Asset set resource names have the form: `customers/{customer_id}/assetSets/{asset_set_id}`
        "status": "A String", # Output only. The status of the asset set. Read-only.
        "type": "A String", # Required. Immutable. The type of the asset set. Required.
      },
      "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 an asset set 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 asset set mutate.
      "assetSet": { # An asset set representing a collection of assets. Use AssetSetAsset to link an asset to the asset set. # The mutated asset set with only mutable fields after mutate. The field will only be returned when response_content_type is set to "MUTABLE_RESOURCE".
        "businessProfileLocationGroup": { # Information about a Business Profile dynamic location group. Only applicable if the sync level AssetSet's type is LOCATION_SYNC and sync source is Business Profile. # Business Profile location group asset set data.
          "dynamicBusinessProfileLocationGroupFilter": { # Represents a filter on Business Profile locations in an asset set. If multiple filters are provided, they are AND'ed together. # Filter for dynamic Business Profile location sets.
            "businessNameFilter": { # Business Profile location group business name filter. # Used to filter Business Profile locations by business name.
              "businessName": "A String", # Business name string to use for filtering.
              "filterType": "A String", # The type of string matching to use when filtering with business_name.
            },
            "labelFilters": [ # Used to filter Business Profile locations by label. Only locations that have any of the listed labels will be in the asset set. Label filters are OR'ed together.
              "A String",
            ],
            "listingIdFilters": [ # Used to filter Business Profile locations by listing ids.
              "A String",
            ],
          },
        },
        "chainLocationGroup": { # Represents information about a Chain dynamic location group. Only applicable if the sync level AssetSet's type is LOCATION_SYNC and sync source is chain. # Represents information about a Chain dynamic location group. Only applicable if the sync level AssetSet's type is LOCATION_SYNC and sync source is chain.
          "dynamicChainLocationGroupFilters": [ # Used to filter chain locations by chain ids. Only Locations that belong to the specified chain(s) will be in the asset set.
            { # One chain level filter on location in a feed item set. The filtering logic among all the fields is AND.
              "chainId": "A String", # Required. Used to filter chain locations by chain id. Only chain locations that belong to the specified chain will be in the asset set.
              "locationAttributes": [ # Used to filter chain locations by location attributes. Only chain locations that belong to all of the specified attribute(s) will be in the asset set. If this field is empty, it means no filtering on this field.
                "A String",
              ],
            },
          ],
        },
        "hotelPropertyData": { # For Performance Max for travel goals campaigns with a Hotel Center account link. Read-only. # Output only. For Performance Max for travel goals campaigns with a Hotel Center account link. Read-only.
          "hotelCenterId": "A String", # Output only. The hotel center ID of the partner.
          "partnerName": "A String", # Output only. Name of the hotel partner.
        },
        "id": "A String", # Output only. The ID of the asset set.
        "locationGroupParentAssetSetId": "A String", # Immutable. Parent asset set ID for the asset set where the elements of this asset set come from. For example: the sync level location AssetSet id where the elements in LocationGroup AssetSet come from. This field is required and only applicable for Location Group typed AssetSet.
        "locationSet": { # Data related to location set. One of the Google Business Profile (previously known as Google My Business) data, Chain data, and map location data need to be specified. # Location asset set data. This will be used for sync level location set. This can only be set if AssetSet's type is LOCATION_SYNC.
          "businessProfileLocationSet": { # Data used to configure a location set populated from Google Business Profile locations. Different types of filters are AND'ed together, if they are specified. # Data used to configure a location set populated from Google Business Profile locations.
            "businessAccountId": "A String", # Immutable. The account ID of the managed business whose locations are to be used. If this field is not set, then all businesses accessible by the user (specified by the emailAddress) are used.
            "businessNameFilter": "A String", # Used to filter Google Business Profile listings by business name. If businessNameFilter is set, only listings with a matching business name are candidates to be sync'd into Assets.
            "emailAddress": "A String", # Required. Immutable. Email address of a Google Business Profile account or email address of a manager of the Google Business Profile account.
            "httpAuthorizationToken": "A String", # Required. Immutable. The HTTP authorization token used to obtain authorization.
            "labelFilters": [ # Used to filter Google Business Profile listings by labels. If entries exist in labelFilters, only listings that have any of the labels set are candidates to be synchronized into Assets. If no entries exist in labelFilters, then all listings are candidates for syncing. Label filters are OR'ed together.
              "A String",
            ],
            "listingIdFilters": [ # Used to filter Google Business Profile listings by listing id. If entries exist in listingIdFilters, only listings specified by the filters are candidates to be synchronized into Assets. If no entries exist in listingIdFilters, then all listings are candidates for syncing. Listing ID filters are OR'ed together.
              "A String",
            ],
          },
          "chainLocationSet": { # Data used to configure a location set populated with the specified chains. # Data used to configure a location on chain set populated with the specified chains.
            "chains": [ # Required. A list of chain level filters, all filters are OR'ed together.
              { # One chain level filter on location in a feed item set. The filtering logic among all the fields is AND.
                "chainId": "A String", # Required. Used to filter chain locations by chain id. Only chain locations that belong to the specified chain will be in the asset set.
                "locationAttributes": [ # Used to filter chain locations by location attributes. Only chain locations that belong to all of the specified attribute(s) will be in the asset set. If this field is empty, it means no filtering on this field.
                  "A String",
                ],
              },
            ],
            "relationshipType": "A String", # Required. Immutable. Relationship type the specified chains have with this advertiser.
          },
          "locationOwnershipType": "A String", # Required. Immutable. Location Ownership Type (owned location or affiliate location).
          "mapsLocationSet": { # Wrapper for multiple maps location sync data # Only set if locations are synced based on selected maps locations
            "mapsLocations": [ # Required. A list of maps location info that user manually synced in.
              { # Wrapper for place ids
                "placeId": "A String", # Place ID of the Maps location.
              },
            ],
          },
        },
        "merchantCenterFeed": { # Merchant ID and Feed Label from Google Merchant Center. # Merchant ID and Feed Label from Google Merchant Center.
          "feedLabel": "A String", # Optional. Feed Label from Google Merchant Center.
          "merchantId": "A String", # Required. Merchant ID from Google Merchant Center
        },
        "name": "A String", # Required. Name of the asset set. Required. It must have a minimum length of 1 and maximum length of 128.
        "resourceName": "A String", # Immutable. The resource name of the asset set. Asset set resource names have the form: `customers/{customer_id}/assetSets/{asset_set_id}`
        "status": "A String", # Output only. The status of the asset set. Read-only.
        "type": "A String", # Required. Immutable. The type of the asset set. Required.
      },
      "resourceName": "A String", # Returned for successful operations.
    },
  ],
}