Search Ads 360 Reporting API . customers . customInterests

Instance Methods

close()

Close httplib2 connections.

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

Creates or updates custom interests. Operation statuses are returned. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [CriterionError]() [CustomInterestError]() [HeaderError]() [InternalError]() [MutateError]() [PolicyViolationError]() [QuotaError]() [RequestError]() [StringLengthError]()

Method Details

close()
Close httplib2 connections.
mutate(customerId, body=None, x__xgafv=None)
Creates or updates custom interests. Operation statuses are returned. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [CriterionError]() [CustomInterestError]() [HeaderError]() [InternalError]() [MutateError]() [PolicyViolationError]() [QuotaError]() [RequestError]() [StringLengthError]()

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

{ # Request message for CustomInterestService.MutateCustomInterests.
  "operations": [ # Required. The list of operations to perform on individual custom interests.
    { # A single operation (create, update) on a custom interest.
      "create": { # A custom interest. This is a list of users by interest. # Create operation: No resource name is expected for the new custom interest.
        "description": "A String", # Description of this custom interest audience.
        "id": "A String", # Output only. Id of the custom interest.
        "members": [ # List of custom interest members that this custom interest is composed of. Members can be added during CustomInterest creation. If members are presented in UPDATE operation, existing members will be overridden.
          { # A member of custom interest audience. A member can be a keyword or url. It is immutable, that is, it can only be created or removed but not changed.
            "memberType": "A String", # The type of custom interest member, KEYWORD or URL.
            "parameter": "A String", # Keyword text when member_type is KEYWORD or URL string when member_type is URL.
          },
        ],
        "name": "A String", # Name of the custom interest. It should be unique across the same custom affinity audience. This field is required for create operations.
        "resourceName": "A String", # Immutable. The resource name of the custom interest. Custom interest resource names have the form: `customers/{customer_id}/customInterests/{custom_interest_id}`
        "status": "A String", # Status of this custom interest. Indicates whether the custom interest is enabled or removed.
        "type": "A String", # Type of the custom interest, CUSTOM_AFFINITY or CUSTOM_INTENT. By default the type is set to CUSTOM_AFFINITY.
      },
      "update": { # A custom interest. This is a list of users by interest. # Update operation: The custom interest is expected to have a valid resource name.
        "description": "A String", # Description of this custom interest audience.
        "id": "A String", # Output only. Id of the custom interest.
        "members": [ # List of custom interest members that this custom interest is composed of. Members can be added during CustomInterest creation. If members are presented in UPDATE operation, existing members will be overridden.
          { # A member of custom interest audience. A member can be a keyword or url. It is immutable, that is, it can only be created or removed but not changed.
            "memberType": "A String", # The type of custom interest member, KEYWORD or URL.
            "parameter": "A String", # Keyword text when member_type is KEYWORD or URL string when member_type is URL.
          },
        ],
        "name": "A String", # Name of the custom interest. It should be unique across the same custom affinity audience. This field is required for create operations.
        "resourceName": "A String", # Immutable. The resource name of the custom interest. Custom interest resource names have the form: `customers/{customer_id}/customInterests/{custom_interest_id}`
        "status": "A String", # Status of this custom interest. Indicates whether the custom interest is enabled or removed.
        "type": "A String", # Type of the custom interest, CUSTOM_AFFINITY or CUSTOM_INTENT. By default the type is set to CUSTOM_AFFINITY.
      },
      "updateMask": "A String", # FieldMask that determines which resource fields are modified in an update.
    },
  ],
  "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 custom interest mutate.
  "results": [ # All results for the mutate.
    { # The result for the custom interest mutate.
      "resourceName": "A String", # Returned for successful operations.
    },
  ],
}