# Search Ads 360 Reporting API . customers . smartCampaignSettings

## Instance Methods

Close httplib2 connections.

Returns the status of the requested Smart campaign.

Updates Smart campaign settings for campaigns.

### Method Details

`close()`

    Close httplib2 connections.

`getSmartCampaignStatus(resourceName, x__xgafv=None)`

    Returns the status of the requested Smart campaign.

    Args:
      resourceName: string, Required. The resource name of the Smart campaign setting belonging to the Smart campaign to fetch the status of. (required)
      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 SmartCampaignSettingService.GetSmartCampaignStatus.
      "eligibleDetails": { # Details related to Smart campaigns that are eligible to serve. # Details related to Smart campaigns that are eligible to serve.
        "endDateTime": "A String", # The timestamp of when the campaign will end, if applicable. The timestamp is in the customer’s timezone and in “yyyy-MM-dd HH:mm:ss” format.
        "lastImpressionDateTime": "A String", # The timestamp of the last impression observed in the last 48 hours for this campaign. The timestamp is in the customer’s timezone and in “yyyy-MM-dd HH:mm:ss” format.
      },
      "endedDetails": { # Details related to Smart campaigns that have ended. # Details related to Smart campaigns that have ended.
        "endDateTime": "A String", # The timestamp of when the campaign ended. The timestamp is in the customer’s timezone and in “yyyy-MM-dd HH:mm:ss” format.
      },
      "notEligibleDetails": { # Details related to Smart campaigns that are not eligible to serve. # Details related to Smart campaigns that are ineligible to serve.
        "notEligibleReason": "A String", # The reason why the Smart campaign is not eligible to serve.
      },
      "pausedDetails": { # Details related to paused Smart campaigns. # Details related to paused Smart campaigns.
        "pausedDateTime": "A String", # The timestamp of when the campaign was last paused. The timestamp is in the customer’s timezone and in “yyyy-MM-dd HH:mm:ss” format.
      },
      "removedDetails": { # Details related to removed Smart campaigns. # Details related to removed Smart campaigns.
        "removedDateTime": "A String", # The timestamp of when the campaign was removed. The timestamp is in the customer’s timezone and in “yyyy-MM-dd HH:mm:ss” format.
      },
      "smartCampaignStatus": "A String", # The status of this Smart campaign.
    }

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

    Updates Smart campaign settings for campaigns.

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

    { # Request message for SmartCampaignSettingService.MutateSmartCampaignSettings.
      "operations": [ # Required. The list of operations to perform on individual Smart campaign settings.
        { # A single operation to update Smart campaign settings for a campaign.
          "update": { # Settings for configuring Smart campaigns. # Update operation: The Smart campaign setting must specify a valid resource name.
            "adOptimizedBusinessProfileSetting": { # Settings for configuring a business profile optimized for ads as this campaign's landing page. # Settings for configuring a business profile optimized for ads as this campaign's landing page. This campaign must be linked to a business profile to use this option. For more information on this feature, consult https://support.google.com/google-ads/answer/9827068.
              "includeLeadForm": True or False, # Enabling a lead form on your business profile enables prospective customers to contact your business by filling out a simple form, and you'll receive their information through email.
            },
            "advertisingLanguageCode": "A String", # The language code to advertise in from the set of [supported language codes] (https://developers.google.com/google-ads/api/reference/data/codes-formats#languages).
            "businessName": "A String", # The name of the business.
            "businessProfileLocation": "A String", # The resource name of a Business Profile location. Business Profile location resource names can be fetched through the Business Profile API and adhere to the following format: `locations/{locationId}`. See the [Business Profile API] (https://developers.google.com/my-business/reference/businessinformation/rest/v1/accounts.locations) for additional details.
            "campaign": "A String", # Output only. The campaign to which these settings apply.
            "finalUrl": "A String", # The user-provided landing page URL for this Campaign.
            "phoneNumber": { # Phone number and country code in smart campaign settings. # Phone number and country code.
              "countryCode": "A String", # Upper-case, two-letter country code as defined by ISO-3166.
              "phoneNumber": "A String", # Phone number of the smart campaign.
            },
            "resourceName": "A String", # Immutable. The resource name of the Smart campaign setting. Smart campaign setting resource names have the form: `customers/{customer_id}/smartCampaignSettings/{campaign_id}`
          },
          "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 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 Smart campaign setting mutate.
          "resourceName": "A String", # Returned for successful operations.
          "smartCampaignSetting": { # Settings for configuring Smart campaigns. # The mutated Smart campaign setting with only mutable fields after mutate. The field will only be returned when response_content_type is set to "MUTABLE_RESOURCE".
            "adOptimizedBusinessProfileSetting": { # Settings for configuring a business profile optimized for ads as this campaign's landing page. # Settings for configuring a business profile optimized for ads as this campaign's landing page. This campaign must be linked to a business profile to use this option. For more information on this feature, consult https://support.google.com/google-ads/answer/9827068.
              "includeLeadForm": True or False, # Enabling a lead form on your business profile enables prospective customers to contact your business by filling out a simple form, and you'll receive their information through email.
            },
            "advertisingLanguageCode": "A String", # The language code to advertise in from the set of [supported language codes] (https://developers.google.com/google-ads/api/reference/data/codes-formats#languages).
            "businessName": "A String", # The name of the business.
            "businessProfileLocation": "A String", # The resource name of a Business Profile location. Business Profile location resource names can be fetched through the Business Profile API and adhere to the following format: `locations/{locationId}`. See the [Business Profile API] (https://developers.google.com/my-business/reference/businessinformation/rest/v1/accounts.locations) for additional details.
            "campaign": "A String", # Output only. The campaign to which these settings apply.
            "finalUrl": "A String", # The user-provided landing page URL for this Campaign.
            "phoneNumber": { # Phone number and country code in smart campaign settings. # Phone number and country code.
              "countryCode": "A String", # Upper-case, two-letter country code as defined by ISO-3166.
              "phoneNumber": "A String", # Phone number of the smart campaign.
            },
            "resourceName": "A String", # Immutable. The resource name of the Smart campaign setting. Smart campaign setting resource names have the form: `customers/{customer_id}/smartCampaignSettings/{campaign_id}`
          },
        },
      ],
    }